Windows 7 Licensing and Immutable Disks

Discussions about using Windows guests in VirtualBox.

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 7. Feb 2012, 17:02

I'll pull from trunk and test it myself. It will take me a day or two, just to warn you.

Is this limited to a single table?
zigg
 
Posts: 16
Joined: 13. May 2010, 03:29
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, OS X

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 7. Feb 2012, 19:37

Built faster than I thought.

Appears to work with my Windows 7 OEM setup (using the virtualize-instead-of-physical licensing option, for the curious).

Now I have to go back to 4.1.8, though, because there have apparently been more changes on the trunk that necessitated me uninstalling my extension pack. :D
zigg
 
Posts: 16
Joined: 13. May 2010, 03:29
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, OS X

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 7. Feb 2012, 20:52

Yes, currently it is limited to a single table.
I already thought about supporting multiple tables, but first I will have a look if it is a good idea to use a dynamic array inside the config or just name it CustomTable1, CustomTable2 etc.

If forgot to attach the patch for 4.1.8 in my last post, so here it is.
Attachments
ACPI_OEM_CUST-4.1.8.zip
(4.64 KiB) Downloaded 413 times
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 7. Feb 2012, 21:23

scp wrote:If forgot to attach the patch for 4.1.8 in my last post, so here it is.

Thank you. I was having some serious issues applying the svn diff to 4.1.8. Now building...
zigg
 
Posts: 16
Joined: 13. May 2010, 03:29
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, OS X

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 8. Feb 2012, 04:43

Ubuntu oneiric packages are (will be, when the build finishes) available here:

https://launchpad.net/~zigg/+archive/vi ... customacpi
zigg
 
Posts: 16
Joined: 13. May 2010, 03:29
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, OS X

Re: Windows 7 Licensing and Immutable Disks

Postby zigg » 8. Feb 2012, 12:55

Build is done. If someone cares about having it on another version, let me know, I can see if it works. This is my first time doing a Launchpad PPA; quite frankly, it rocks.
zigg
 
Posts: 16
Joined: 13. May 2010, 03:29
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, OS X

Re: Windows 7 Licensing and Immutable Disks

Postby Lauscher » 30. Mar 2012, 19:01

Hello,

thank you for building the patch!

I tried it using the ppa, with some success, with some errors, and with something missing.
I'm using VirtualBox 4.1.10_ubuntu r76795. (Host=Xubuntu 11.10, guest=Xubuntu 11.10)

With "setextradata" I set successfully:
* DmiBoardVendor
* DmiBoardProduct
* DmiBoardVersion
* DmiBoardSerial

Looking with 'dmidecode -t2' I get these parameters, but at the end of the output there appears:
Wrong DMI structures length: 608 bytes announced, structures occupy 275 bytes

-----------------------------------------
I get the error
Invalid configuration for device pcbios device (VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES).

at running the VM when I try to set
* DmiBoardAssetTag
* DmiBoardLocInChass
* DmiProcManufacturer
* DmiProcVersion
------------------------------------------
I get no error of setting Chassis parameters, but they don't appear in the guest using 'dmidecode -t3':
* DmiChassisAssetTag
* DmiChassisSerial
* DmiChassisVendor
* DmiChassisVersion

I got these parameters out of this script, I think, it is that one you change with your patch.
I think, not all of these parameters were intended of you to set; but they woud be useful and are set by the same routine as I think you are patching.

In 'apicust-doc.patch' I found:
<screen>VBoxManage setextradata "VM name"
+ "VBoxInternal/Devices/acpi/0/Config/CustomTable" "/path/to/table.bin"</screen>
+
+ <para>Configuring an custom ACPI table can prevent Windows
+ Vista and Windows 7 from asking for a new product
+ key. On Linux hosts, one of the host tables can be read from
+ <filename>/sys/firmware/acpi/tables/</filename>.</para>

Edit:
At first I didn't know how to get DSDT; in /sys/firmware/acpi/tables/ I only found some system files with no content. I searched for a solution and found maybe this one: using
Code: Select all   Expand viewCollapse view
sudo acpidump -t DSDT -o ~/dsdt.host -b

I got the DSDT-table. Using
VBoxManage setextradata "Vubuntu" "VBoxInternal/Devices/acpi/0/Config/CustomTable" ~/dsdt.host

works without errors.
I did
Code: Select all   Expand viewCollapse view
sudo acpidump -t DSDT -o ~/dsdt.guest -b
in the guest to check this. Something seems to be not correct. The file dsdt.host has an amount of 17.5kb, the file dsdt.guest only 6.9kb.

Or did I understand something wrong about DSDT? Where can I see the changes done by "setextradata ... Customtable"? 'dmidecode' in the VM shows me the same data as before.
I'm lucky about finding this thread and the patch, and I hope, it will get into official versions, too.
Lauscher
 
Posts: 47
Joined: 14. Mar 2012, 14:19
Location: Germany
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 31. Mar 2012, 01:23

Yes, my patch only adds the following DMI values
+ DmiBoardProduct
+ DmiBoardSerial
+ DmiBoardVendor
+ DmiBoardVersion

The "Wrong DMI structures length" can not be avoided currently, because it is a fixed value. But I don't think it harms the system.
The Chassis structure is available in the code but disabled by default. But the package creator has to enable it before building.

You can not overwrite the DSDT table. DSDT, SSDT, FACP, XSDT and APIC (and may be FACS, HPET, MCFG, RSDT) are important tables which are filled by VirtualBox with the right content.
You can try tables like BOOT, INFO, OEMB but I only tested SLIC, so I dont know what effects the others have.

PS: DMI and ACPI are different parts. So ACPI tables, including the CustomTable, are not presented in dmidecode.
PPS: DmiBoardAssetTag, DmiBoardBoardType, DmiBoardLocInChass is not in my Patch but in trunk so you can use it in future versions (4.2.0 I think).
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Lauscher » 31. Mar 2012, 11:14

Hello scp,

thank you for your fast and helpful answer!
I'm not firm with all these tables - DSDT, SSDT, FACP, XSDT, APIC, FACS, HPET, MCFG, RSDT, BOOT, INFO, OEMB, SLIC, wow.
Can you tell me how to get the SLIC-table and maybe BOOT, INFO, OEMB?
Did I understand right I can only give one of them to the VM with "setextradata...CustomTable"? I read about SLIC in Wikipedia, it seems to be most important to "make Windows happy".
scp wrote:PPS: DmiBoardAssetTag, DmiBoardBoardType, DmiBoardLocInChass is not in my Patch but in trunk so you can use it in future versions (4.2.0 I think

That's fine :-). What about these parameters: DmiOEMVBoxVer, DmiOEMVBoxRev, pOEMStrings?

The background of my questions is a german wiki-article I'm writing on. I try to give a guidance to use physical installed systems in VirtualBox using raw disk access. It works fine with XP and Ubuntu - only Windows 7 wants to get activated again, whenever I change between virtual and physical boot. So I try to make the virtual hardware similar to the physical hardware most possible as I can. One important hardware Windows 7 is checking is the "same" motherboard.
zigg wrote:Appears to work with my Windows 7 OEM setup (using the virtualize-instead-of-physical licensing option, for the curious).

What is that for an option? Can I set it in an installed Windows 7?

A bit OT:
This part of the VB-script I found very interesting - it reads some information from the host and gives them to the guest. (But only DmiSystemProduct and DmiSystemVersion). If this function would be do much more, like making the virtual machine most similar to the host as possible, it would be great.
Code: Select all   Expand viewCollapse view
/**
 * Try fetch the DMI strings from the system.
 */
static void fwCommonUseHostDMIStrings(void)
{
    int rc;

    rc = RTSystemQueryDmiString(RTSYSDMISTR_PRODUCT_NAME,
                                g_szHostDmiSystemProduct, sizeof(g_szHostDmiSystemProduct));
    if (RT_SUCCESS(rc))
    {
        s_szDefDmiSystemProduct = g_szHostDmiSystemProduct;
        LogRel(("DMI: Using DmiSystemProduct from host: %s\n", g_szHostDmiSystemProduct));
    }

    rc = RTSystemQueryDmiString(RTSYSDMISTR_PRODUCT_VERSION,
                                g_szHostDmiSystemVersion, sizeof(g_szHostDmiSystemVersion));
    if (RT_SUCCESS(rc))
    {
        s_szDefDmiSystemVersion = g_szHostDmiSystemVersion;
        LogRel(("DMI: Using DmiSystemVersion from host: %s\n", g_szHostDmiSystemVersion));
    }
}


Edit:
Maybe another possible way to "make Windows happy":
Copying the physical BIOS using 'dd' and giving it to the VM using
Code: Select all   Expand viewCollapse view
VBoxManage setextradata <vmname> VBoxInternal/Devices/pcbios/0/Config/BiosRom <ROM image pathname>

I'm not sure how tu use 'dd' right to get the whole BIOS. As a hint I found
Code: Select all   Expand viewCollapse view
sudo dd if=/dev/mem bs=1k skip=768 count=256 2>/dev/null | strings -n 8
Last edited by Lauscher on 23. Apr 2012, 22:13, edited 1 time in total.
Lauscher
 
Posts: 47
Joined: 14. Mar 2012, 14:19
Location: Germany
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 31. Mar 2012, 17:45

All usefull Info you can get is readable by the tools, you already used: dmidecode and acpidump.
You can read the full BIOS but this does not work in the VM. The BIOS is the "Basic Input Output System", it is hardly coded for your physical hardware and not for the virtual hardware.
DMI is part of the BIOS, so you don't need to transfer the rest. I only know one additional value which is read by some OEM Windows for activation: The BIOS copyright, placed near the end. I have a patch for this, but the patch is not checked enough to release.

There is already a thread in this forum for Windows Activation of the "normal" versions.
And for Windows 7 OEM all required values can already be set with 4.1.x and my patch. Just read the posts above (page 1) for information about this.
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Lauscher » 31. Mar 2012, 18:35

Hello scp,

I hope I didn't annoy you. I still have a problem to get the SLIC-table; I only found
so you need: a) a 374 Byte copy of the SLIC table from the real device

about this. Since yesterday I've read the manpages auf dmidecode and acpidump, also I asked Google a lot, but wasn't successfull.
I would be thankfull if you can give me a hint how to get this table; after then I won't "spam" this thread any longer.
Lauscher
 
Posts: 47
Joined: 14. Mar 2012, 14:19
Location: Germany
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10

Re: Windows 7 Licensing and Immutable Disks

Postby scp » 31. Mar 2012, 19:51

If you have Linux installed or use a live CD like KNOPPIX, then you can use
Code: Select all   Expand viewCollapse view
ls /sys/firmware/acpi/tables/

to see if there is a file named SLIC. It may display 0 Byte, but this is ok.
If you see other tables like DSDT, but no SLIC, then your system does not have a SLIC table.

then you can copy the table to a file:
Code: Select all   Expand viewCollapse view
dd if=/sys/firmware/acpi/tables/SLIC of=~/SLIC.bin
scp
 
Posts: 106
Joined: 14. Feb 2010, 22:12
Primary OS: Ubuntu 12.04
VBox Version: OSE self-compiled
Guest OSses: Windows XP, 2003, 7, 8.1

Re: Windows 7 Licensing and Immutable Disks

Postby Lauscher » 31. Mar 2012, 19:57

Hey, thank you! :D

Right now, as you wrote this, I figured out that I don't have a SLIC table, so I couldn't find it :roll:
And I found a similar way using acpidump for those who have a SLIC table
Code: Select all   Expand viewCollapse view
sudo acpidump -t SLIC -b >SLIC.bin


I will take this into my guidance and feel happy!
Lauscher
 
Posts: 47
Joined: 14. Mar 2012, 14:19
Location: Germany
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10

Dell OEM Issue

Postby sonicfrequency » 8. Jun 2012, 04:04

Hello all!

I just have a couple quick questions.

Configuration:

•Dell Latitude E6410.
•2 partition rawdisk setup.
•Windows 7 (/dev/sda1), Linux Mint (/dev/sda2).

I want the ability to use Linux Mint as my primary OS then Virtualize or natively boot into my Windows 7 partition fully activated.

VMWare:

•I've correctly patched and setup VMWare 8 on my Linux Mint partion.
•I then use Dell OEMBios at VMWare boot time. This works for both virtual and native Windows 7and stays activated. I'm a fan of open source software and the 3d acceleration is shotty at best on VMWare. Which is why I'm trying to use VirtualBox.

VirtualBox:

•I can successfully add the Zigg repository & ppa to install the patched VirtualBox 4.1.14-dfsg-1+acpi.1 via synaptic and all works well.
•I can boot into the Windows 7 partition and virtualize the Linux Mint partition with great 3d acceleration etc and rock solid stability.
•Of course the OEM activation doesn't work until I extract the SLIC and add the ExtraDataItems.

VirtualBox SLIC Setup:

•I've extracted my 374 byte SLIC.bin to my VM machine directory directly using:
ls /sys/firmware/acpi/tables/
dd if=/sys/firmware/acpi/tables/SLIC of=/root/virtualbox vms/win7/SLIC.bin

•I then used demidecode and entered the following params to modify my vbox file:
VBoxManage setextradata "win7" "VBoxInternal/Devices/acpi/0/Config/SLICRom" "SLIC.bin"
VBoxManage setextradata "win7" "VBoxInternal/Devices/pcbios/0/Config/DmiBoardProduct" "0667CC"
VBoxManage setextradata "win7" "VBoxInternal/Devices/pcbios/0/Config/DmiBoardVendor" "Dell Inc."
VBoxManage setextradata "win7" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemProduct" "Latitude E6410"
VBoxManage setextradata "win7" "VBoxInternal/Devices/pcbios/0/Config/DmiSystemVendor" "Dell Inc."

The problem:

I receive "Configuration error: Invalid config key for ACPI device (VERR_PDM_DEVINS_UNKNOWN_CFG_VALUES)." When I remove the reference to SLIC.bin, everything works fine again, minus activation. :evil:

The cause:

•I've read through some forums and there's a possibility the Dell SLP string address is not in the valid DMI range. Activation reads a different location in the BIOS memory. Is there an ExtraDataItems parameter to change the memory read location? The thread is at forums. mydigitallife. info /threads/3957-VirtualBox-SLP-amp-SLIC.

•Thank you for this post and all the work you've done! Trust me I understand how time consuming and tedious these projects are! There is just some innate desire to figure everything out. I love those ahha moments! When everything works and it took you 3 days to figure it out!
sonicfrequency
 
Posts: 15
Joined: 8. Jun 2012, 03:19

Re: Windows 7 Licensing and Immutable Disks

Postby Lauscher » 8. Jun 2012, 13:22

Hello sonicfrequency,

VBoxManage setextradata "win7" "VBoxInternal/Devices/acpi/0/Config/SLICRom" "SLIC.bin"

You only write "SLIC.bin". Try to give the full path to the file:
Code: Select all   Expand viewCollapse view
/root/virtualbox vms/win7/SLIC.bin

Use correct typing BIG/small. My VM-folder is written "VirtualBox VMs", not "virtualbox vms". Maybe this could be a problem, too.
Is there an ExtraDataItems parameter to change the memory read location?

I don't know.
Lauscher
 
Posts: 47
Joined: 14. Mar 2012, 14:19
Location: Germany
Primary OS: Ubuntu other
VBox Version: PUEL
Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10

PreviousNext

Return to Windows Guests

Who is online

Users browsing this forum: No registered users and 16 guests