Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My new laptop came preinstalled with Windows 8. Naively, as I am, I just formatted the harddrive and installed fine old Ubuntu. Now I want to install Windows 8 for dual boot again, but I have no DVD and do download the ISO one needs a product key. That key is not on the back of the laptop anymore but somewhere on the mainboard.

Is there any way to recover the product key from the mainboard using Ubuntu?

share|improve this question

2 Answers 2

up vote 10 down vote accepted

Usually, OEM manufacturers have preloaded a key electronically on a ROM. Windows will identify this and automatically activate your installation. You may see some trace of this using

sudo dmidecode

listed as OEM-specific Types, encoded/encrypted, which may hold it. Major OEMs like HP and Dell use this. Ask on Windows websites for more details; this is the wrong place. The only detail I remember is that one needs an OEM version of the Windows installation disc (i.e. non-retail).

share|improve this answer

Another way that doesn't require looking through a ton of output is:

sudo acpidump -b -t MSDM | dd bs=1 skip=56 2>/dev/null;echo

acpidump dumps the table (default in hexdump format), but the -b options tells it to output the raw data. Since we only need the last part of the table, pipe the output into dd, but but skip the unnecessary junk. Finally, add an echo at the end to make it terminal-friendly =D

acpidump -t MSDM will work as well, but the key is broken over multiple lines, making it hard to copy.

Update thanks to Lekensteyn:

New versions of acpidump shipped with Ubuntu work differently than described above. The -b flag causes acpidump to write to a file under all circumstances, so an alternative method is to use the command

sudo tail -c+57 /sys/firmware/acpi/tables/MSDM

A legitimate Windows 8 installer should automatically detect the key in the ACPI and continue installing with the built-in key.

It should be noted, however, that I used this method to try to install Win8 in a VM using my own product key, but it automatically deactivated saying that the product key was in use. So, it's of little use in all reality. Since Win8 OEM keys are designed to be tied to that specific computer, you'll hit a brick wall if you ask Microsoft to unregister the key so you can use it in a VM, let alone another computer.

The only way you could use the key is if you had never booted into Win8 to begin with or weren't connected to a network when you did. Even so, if your VM/new computer is ever allowed to connect to the network, it will automatically register the key making your actual installation unusable.

share|improve this answer
Was just trying this out, and the command above cut off one of the characters. I used sudo acpidump -b -t MSDM | dd bs=1 skip=56 2>/dev/null;echo and I got the full key out. –  Andrew C Aug 29 '13 at 5:49
You are correct, sorry about that. Updating my answer. –  Githlar Sep 5 '13 at 22:31
The -b option is specific to the acpidump tool included with the kernel tree. Newer Ubuntu versions ship with a different acpidump tool (from iasl) which have different options. I could not test this command, but it should work: sudo acpidump -n HPET | tail -n+2 | xxd -r | head -c+57. Alternative method: sudo tail -c+57 /sys/firmware/acpi/tables/MSDM –  Lekensteyn Jul 1 '14 at 16:34
@Lekensteyn I noticed that recently too when I was on the phone with MS. If you do the -b option, it defaults to bumping to a file now for some reason. I wonder if there is a way to flag that a pipe be destroyed when there's no more data left on it... another topic for another day though. Your first command didn't work for me, however the second one was just fine. I'll update my answer to include it =) –  Githlar Jul 6 '14 at 23:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.