Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
software:virtualbox [2011/12/14 22:01] cyril |
software:virtualbox [2014/11/29 10:03] (current) cyril |
||
---|---|---|---|
Line 3: | Line 3: | ||
===== Using same installation for DualBoot and VirtualBoot ===== | ===== Using same installation for DualBoot and VirtualBoot ===== | ||
+ | How to boot Windows from its partition with VirtualBox. | ||
+ | |||
+ | ==== Summary ==== | ||
+ | === Install Windows === | ||
+ | We will assume it is installed on partition 1. | ||
+ | |||
+ | === Create disk === | ||
+ | * Create the MBR. Two ways, from your disk, but the second one seems better:< | ||
+ | dd if=/dev/sda of=disk.mbr bs=512 count=1 | ||
+ | </ | ||
+ | install-mbr -e1 --force ./disk.mbr | ||
+ | </ | ||
+ | * Create the virtual disk:< | ||
+ | VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk /dev/sda -partitions 1 -relative -mbr disk.mbr # if single partition for windows | ||
+ | VBoxManage internalcommands createrawvmdk -filename disk.vmdk -rawdisk /dev/sda -partitions 1,2 -relative -mbr disk.mbr # if boot + system partition for windows | ||
+ | </ | ||
+ | |||
+ | === Create machine === | ||
+ | |||
+ | * Create the virtual machine in VirtualBox the usual way, with the following settings: | ||
+ | * check " | ||
+ | * set your real mac address for the Network adapter | ||
+ | * Set the DMI BIOS information to avoid activation problems. Execute:< | ||
+ | sudo dmidecode -t0 # provides DmiBIOS* variables | ||
+ | sudo dmidecode -t1 # provides DmiSystem* variables | ||
+ | </ | ||
+ | #! /bin/sh | ||
+ | VM_NAME=" | ||
+ | VSETED=" | ||
+ | CFG_PATH=" | ||
+ | # update the following values: | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | $VSETED $CFG_PATH/ | ||
+ | </ | ||
+ | |||
+ | === Fix Windows === | ||
+ | |||
+ | When you will boot your new virtual machine, it will fail. | ||
+ | * If you get an error with grub, because you used the first method to create the MBR, you have to mount the installation or recovery DVD of Windows in your virtual machine, start it, and choose to repair it after the language selection. | ||
+ | * If it fails, you can try to do it manually. Still on the installation DVD, type " | ||
+ | < | ||
+ | Bootrec.exe /FixMbr | ||
+ | </ | ||
+ | * You can also try different combinations of partitions you export with VBoxManage (sometimes it can require 1,2,3 which are diagnostic, | ||
+ | * If you get a BSOD "Stop: 0x0000007b" | ||
+ | Windows Registry Editor Version 5.00 | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\primary_ide_channel] | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\secondary_ide_channel] | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*pnp0600] | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\*azt0502] | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\gendisk] | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\CriticalDeviceDatabase\pci# | ||
+ | " | ||
+ | " | ||
+ | |||
+ | ;Add driver for Atapi (requires Atapi.sys in Drivers directory) | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\atapi] | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | 52, | ||
+ | 00, | ||
+ | |||
+ | ;Add driver for intelide (requires intelide.sys in drivers directory) | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\IntelIde] | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | 52, | ||
+ | 00, | ||
+ | |||
+ | |||
+ | ;Add driver for Pciide (requires Pciide.sys and Pciidex.sys in Drivers directory) | ||
+ | |||
+ | [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\PCIIde] | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | 52, | ||
+ | 00, | ||
+ | </ | ||
+ | |||
+ | |||
+ | ==== Sources - Story ==== | ||
+ | |||
+ | First I tried the following tutorial: | ||
[[http:// | [[http:// | ||
- | Don't forget to check " | + | But I had a problem for booting, and the installation dvd could not repair the install, so I tried this tutorial: |
+ | |||
+ | [[https:// | ||
+ | |||
+ | But I still had the same problem, a BSOD with error STOP OxOOOOOO7b. | ||
+ | |||
+ | Then I found on this thread some people having the same problem: | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | Apparently one solved the problem by using an IDE disk instead | ||
+ | |||
+ | [[http:// | ||
+ | |||
+ | I did not find the .cab file to extract, but the .sys drivers were already at the right place, so I just merged the .reg file after rebooting to the native Win7, and then it worked also in VirtualBox, even with SATA ! | ||
+ | |||
+ | Several years after I ran into more problems and found this complete tutorial: | ||
+ | |||
+ | [[https:// |