139

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:

https://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.

2

4 Answers 4

181

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.

9
  • 4
    Quite interesting. But is this key actually usable? I believe there's more to embedded licenses than the actual key.
    – Daniel B
    Feb 18, 2014 at 0:13
  • 2
    @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
    Apr 19, 2014 at 7:03
  • 44
    Or more simply: sudo hexdump -s 56 -e '"MSDM key: " /29 "%s\n"' /sys/firmware/acpi/tables/MSDM
    – david6
    Dec 15, 2014 at 22:34
  • 2
    I 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
    Dec 16, 2014 at 12:42
  • 6
    @david6 Simpler: sudo tail -c +56 /sys/firmware/acpi/tables/MSDM Apr 26, 2016 at 20:12
32

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 #.

3
  • 1
    Yup, 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
    Sep 26, 2014 at 8:32
  • 8
    For legibility: sudo cat /sys/firmware/acpi/tables/MSDM | strings Nov 24, 2014 at 18:00
  • 1
    And to get the actual key sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1 Oct 23, 2017 at 13:10
10

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: ** ** ** ** **                                   *****
...
3
  • 2
    Hm - 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
    Sep 14, 2014 at 5:36
  • @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
    Sep 14, 2014 at 6:47
  • any help doing this in freeBSD? the acpidump tool is quite different.
    – Hakim
    May 25, 2021 at 13:33
10

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

2
  • 2
    To get only the key, add: | tail -1 at the end of the command.
    – Victor
    Mar 28, 2018 at 9:14
  • still working with ubuntu 18.04
    – Cutton Eye
    Jan 13, 2020 at 15:36

You must log in to answer this question.

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