Windows 10 and High Sierra upgrade problems This is more weird than most things.

I have an iMac 2009 and had Windows 10 installed alongside macOS 10.12.6, I ran all the updates and then tried to apply High Sierra.

It fails with "firmware error" which is connected to the EFI/UEFI and Windows 10.

Only macOS boots, so that is fine for now.

I want to reinstall Windows 10 but do not have the activation key, where might it be stored on my iMac?  

There are photo's etc on Windows 10 partition that I can access using a DVD with KNOPPIX on.  It will mount the partition read only, and before I delete or damage anything I would like to extract the Windows 10 activation key from a non working Windows 10 install.

As macOS is POSIX compliant would (I thought I would ask first) this work?

And to get the actual key 

sudo cat /sys/firmware/acpi/tables/MSDM | strings | tail -n 1


Any help or suggestions please.
Windows 10 doesn't store the activation key in any useable form, it also changes with each major Win10 update.
It's hashed from your machine's hardware, unless you have an actual 'paper' license with an installation serial number on it. 

See MS KB - Find your Windows product key &amp; Activation in Windows 10