How do I get out my embedded Windows 8+ key from a Linux environment?

127

63

I have seen other SuperUser questions on this topic: How to find Windows 8 product key? | How to find Windows 8 OEM product key? However, all of the answers assume you have Windows 8 running.

I've already done a clean install of Ubuntu 13.04 on my new laptop, and I'm trying to set up a VM environment for those occasional programs that just absolutely refuse to run even with Wine.

I saw this image on another answer:

http://i.stack.imgur.com/v14oN.jpg

So it appears that the key should somehow be available via ACPI. However, I've tried ls /proc/acpi and that turns up nothing useful as far as I can see, and acpitool isn't helping me at all.

How the heck can I get the product key out?

EDIT: I have tried running RW-Everything via Wine (the pictured program), but it is unable to 'install its driver'. So no dice there.

Riking

Posted 2013-08-29T00:16:59.420

Reputation: 3 093

At least with my Windows 8.1 installation, this results in a key different from that produced by this other solution.

– caw – 2019-04-30T00:37:51.720

Answers

170

I found it! I needed to do this:

ls /sys/firmware/acpi/tables

Which gave me the MSDM table I was looking for.
I have found my license key! :D

To get it, you need to read the contents of the /sys/firmware/acpi/tables/MSDM file.

Here's an example:

riking@hp-laptop:~$ sudo xxd /sys/firmware/acpi/tables/MSDM
0000000: 4d53 444d 5500 0000 0313 4850 514f 454d  MSDMU.....HPQOEM
0000010: 534c 4943 2d4d 5043 0100 0000 4850 2020  SLIC-MPC....HP  
0000020: 0000 0400 0100 0000 0000 0000 0100 0000  ................
0000030: 0000 0000 1d00 0000 4639 XXXX XXXX XXXX  ........F98**-**
0000040: XXXX XXXX XXXX XXXX XXXX XXXX XXXX XXXX  ***-*****-*****-
0000050: XXXX XXXX XX                             ****T

The *** are the contents of the license key, in ASCII text.

Riking

Posted 2013-08-29T00:16:59.420

Reputation: 3 093

39Or more simply: sudo hexdump -s 56 -e '"MSDM key: " /29 "%s\n"' /sys/firmware/acpi/tables/MSDM – david6 – 2014-12-15T22:34:03.290

2I had the same problem and successfully extracted the key with this method, which only works for UEFI systems.

However, when you just want to reinstall your system which came with Windows preinstalled, it is only necessary to get an installation image (Microsoft makes it hard enough for some reason), circumvent the pesky key check with a generic OEM key depending on the version you want to install, and when the install is finished, Windows will pick up your key from the EFI BIOS and activate automatically (!). Tesed on my own system with a Windows 8.1 reinstall. – Gregor – 2014-12-16T12:42:10.173

1I am running Fedora and I get sudo: hd: command not found. I used the xxd command instead and I get basically the same output as you have. sudo xxd /sys/firmware/acpi/tables/MSDM – DanielTA – 2015-06-01T01:18:24.537

Seems to work here even though not using UEFI (?). Thanks! – Wilf – 2016-02-14T21:43:20.210

@Wilf In this case, UEFI has nothing to do with having the ACPI tables on the hardware. – Riking – 2016-02-15T04:56:36.480

6@david6 Simpler: sudo tail -c +56 /sys/firmware/acpi/tables/MSDM – Nehal J Wani – 2016-04-26T20:12:20.497

brilliant ! thanks! – Hanan Shteingart – 2019-12-06T11:24:42.510

4Quite interesting. But is this key actually usable? I believe there's more to embedded licenses than the actual key. – Daniel B – 2014-02-18T00:13:39.807

1@DanielB All you need to do is call MS and confirm that you are, in fact, installing Windows on the same computer as the one you were sold. – Riking – 2014-04-19T07:03:35.110

28

Using Fedora I have tried with:

sudo cat /sys/firmware/acpi/tables/MSDM

Which gave me the following results:

MSDMUoDELL  QA09   LOHR#####-#####-#####-#####-#####%  

The product key was replaced with #.

Rubens Mariuzzo

Posted 2013-08-29T00:16:59.420

Reputation: 387

1Yup, that works too - I put hd in my answer because it displays the binary data too, so you have a clearer separation of where it starts. – Riking – 2014-09-26T08:32:11.697

8For legibility: sudo cat /sys/firmware/acpi/tables/MSDM | strings – Aaron J Lang – 2014-11-24T18:00:19.487

1And to get the actual key sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1 – George Sapkin – 2017-10-23T13:10:48.560

9

I couldn't find /sys/firmware/acpi/tables/MSDM on my ASUS T100TA running Ubuntu 13.10 amd64, but I found a packaged called acpidump quite useful. Running acpidump as root I was able to get the MSDM table contents.

$ sudo acpidump
...
MSDM @ 0x78d53f90
  0000: 4d 53 44 4d 55 00 00 00 03 6c 5f 41 53 55 53 5f  MSDMU....l_ASUS_
  0010: 4e 6f 74 65 62 6f 6f 6b 00 00 00 00 41 53 55 53  Notebook....ASUS
  0020: 01 00 00 00 01 00 00 00 00 00 00 00 01 00 00 00  ................
  0030: 00 00 00 00 1d 00 00 00 ** ** ** ** ** ** ** **  ........*****-**
  0040: ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **  ***-*****-*****-
  0050: ** ** ** ** **                                   *****
...

Eric

Posted 2013-08-29T00:16:59.420

Reputation: 91

2Hm - two things. (1) why are you on 13.10, it's september 2014. And (2) - does the folder /sys/firmware/acpi/tables/ exist? Possible that you have something mounting it somewhere else (or not at all). – Riking – 2014-09-14T05:36:15.767

@Riking, it does exist but the only file in that directory is DSDT. At the time I setup the device 13.10 was the latest version of Ubuntu available. It was rather complicated to get 64-bit Linux running with 32-bit UEFI so I didn't spend time to upgrade it. I really never use the device anyway and thought it might be nice to put Windows 8 back on it for others to use. – Eric – 2014-09-14T06:47:11.500

8

This is a variant of the accepted answer giving you a much more user-friendly output, easier to read and copy

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

Tested on a Ubuntu 14.04 for a Windows 8.1

XavierStuvw

Posted 2013-08-29T00:16:59.420

Reputation: 309

1To get only the key, add: | tail -1 at the end of the command. – Victor – 2018-03-28T09:14:42.343

still working with ubuntu 18.04 – Cutton Eye – 2020-01-13T15:36:09.350