21

I have a dual boot windows 8 and Ubuntu on my Laptop.

Is it possible to read the Windows licence key under ubuntu? (I guess it is hidden in the Windows registry somehow)

4
  • Is it a UEFI system, If so, It's probably in the UEFT Key memory?
    – Amith KK
    Feb 22, 2014 at 8:43
  • Yes, it is an UEFI System. I already found it and posted the ansewer below ;)
    – rubo77
    Feb 22, 2014 at 9:03
  • 2
    Reviewers: This is not off-topic. It is about using Ubuntu to find information in a Windows installation. Perfectly fine.
    – Seth
    Feb 22, 2014 at 19:24
  • Agreed, this is on-topic, especially considering it appears that this may really be about reading ACPI information from firmware storage: this information isn't even stored inside what most of us would think of as the Windows system. Feb 22, 2014 at 23:31

4 Answers 4

36

I found it here. The key seems to be stored in the ACPI-firmware:

sudo strings /sys/firmware/acpi/tables/MSDM

Which gave me the following results:

MSDMU
LENOVOCB-01   
ACPI
#####-#####-#####-#####-#####

(I replaced the product key with #)

pipe into | tail -n1 if you need only the key as output.

4
  • 2
    That may be Lenovo specific to have the key in the firmware. My work computers (Dell Laptop and Compaq Desktop) have a SLIC, but no MSDM. Admittedly, both these computers predate Windows 8 by a few years.
    – The Dude
    Feb 20, 2014 at 19:56
  • 1
    On newer Dell PCs, that table actually exists. I have found it on two Dell Precision T1700 desktops from june 2014. Jul 29, 2014 at 9:44
  • This worked great on a Lenovo Yoga3. Sep 19, 2016 at 19:36
  • Worked on my UEFI Acer Aspire V. So it applies to other UEFI systems.
    – Torrien
    Mar 17, 2018 at 17:58
3

If your HD is broken and need to install on a new HD or just want to know the key without an HD, this may help you:

sudo acpidump > myhiddenkey.txt

after that, search in your HOME folder the .txt file you just created. Press F3 to search within the file the word "MSDM" and bingo!

If you do not have acpmdump yet, time to install it using

sudo apt-get install acpidump

It worked on my Live pendrive of Ubuntu 14.04 LTS on Positivo notebook. The key was of a Windows 8 Single-language.

5
  • Ops, i forgot. The reason to output on a txt file is because the terminal window may not support so many lines of text. Sep 22, 2015 at 16:09
  • The result is some 8 lines after the occurrrence of "MSDM" so this will show the key: sudo acpidump|grep MSDM -A8 without using a textfile
    – rubo77
    Sep 23, 2015 at 22:32
  • 1
    acpidump has the option -n to select only one part. This will output the key in one line: sudo acpidump -n msdm | cut -c58-|xargs|tr -d " "
    – rubo77
    Sep 24, 2016 at 8:31
  • is there a way to know which version of windows it belongs to? 8 or 8.1? or it doesn't matter? I don't want to use 3rd party checkers Nov 2, 2016 at 8:57
  • any help doing this with acpidump in FreeBSD? the tool is quite different.
    – Hakim
    May 25, 2021 at 13:25
1

Got another one to add on to the last command that helped me:

sudo acpidump|grep MSDM -A6|cut -c58- |xargs | tr -d " " | grep -oP '[^.]+$'

I'm not sure if the string is definitely at the end, but that's how I extracted the key itself.

3
  • Always treat your answer as the only true answer. 😃
    – rubo77
    Sep 24, 2016 at 5:00
  • To make this a good answer, add that the exact position could differ on other systems. This will select exact 6 lines after finding MSDN in the output, which is in HEX
    – rubo77
    Sep 24, 2016 at 8:15
  • you can use acpidump -n msdm instead of sudo acpidump|grep MSDM -A6
    – rubo77
    Sep 24, 2016 at 8:31
1

A slight refinement on the accepted answer. This will only print the key:

sudo strings /sys/firmware/acpi/tables/MSDM | grep .*-.*-.*-.*-.*
1
  • 1
    better use sudo strings /sys/firmware/acpi/tables/MSDM |tail -n1 (in the rare case your vender name fits to your grep regex)
    – rubo77
    Jul 2, 2017 at 10:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .