Hi
(please see questions at end of post, but first the background...)
I've been struggling for days (I'd say weeks, but the truth hurts too much!) to get my natively installed Windows 7 Professional 32-bit installation working in my dual-booted Ubuntu 11.10 host (on an HP ProBook 4710S). I looked at a lot of sites/blogs/posts with the following being the most helpful:
http://www.rajatarya.com/website/taming ... tualbox-vm
http://riaschissl.blogspot.com/2009/03/ ... g-raw.html
and obviously viewtopic.php?t=33356 (apologies for the new thread)
Using the above, I succeed in getting Windows 7 to run as guest (I have to run Virtualbox as root).
HOWEVER, I have to use a Windows rescue disc to "fix the installation" because the Windows Boot Manager tells me that
"Windows failed to start. A recent hardware or software change might be the cause. ... bla bla...
File: /Windows/System32/winload.exe
Status: 0xc000000e
Info: The selected entry could not be loaded because the application is missing or corrupt".
If I do "fix" this with the rescue disc Windows boots in the VM (success!), but if I then boot Windows natively I get the same error and have to "fix" Windows again with the rescue disc! Obviously this is inconvenient (putting it mildly) and feels utterly unsafe (as I've heard running raw is). Any help will be appreciated!
A couple of things bother me about this:
- The Windows partition (/dev/sda2 on my installation) is mounted as read-only. How can the rescue disc "break" the native installation from within Ubuntu if nothing can be written?
- This does not seem to be the MBR otherwise the Windows Boot Manager wouldn't load. Also, the boot manager clearly knows the hardware has changed. So if it cannot find the winload.exe (because it isn't corrupt!), you have to assume it cannot find the Windows root directory. But isn't this what the "dummy" MBR is supposed to tell it?
- The boot manager recognizes the change in hardware, but the script from the "Windows 7: In both VM and native (using Linux as host OS) -- VirtualBox 3.x" thread should report the host hardware to the Windows guest. Can the reporting be more complete so that the guest does not "see" different hardware?
Thanks!
Windows 7 as native and as raw guest on Ubuntu host
-
cioma
- Posts: 6
- Joined: 18. Feb 2010, 10:33
- Primary OS: MS Windows 7
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: WinXP, Ubuntu 9.10
Re: Windows 7 as native and as raw guest on Ubuntu host
I have exactly the same situation with Ubuntu 11.10 host and Windows 7 Ultimate x64 guest
-
Lauscher
- Posts: 47
- Joined: 14. Mar 2012, 14:19
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
- Location: Germany
Re: Windows 7 as native and as raw guest on Ubuntu host
I'm working on this problems and I'm writing a german article, where you can find some hints.
If you are (physically) using dualboot with the Windows bootloader instead of GRUB, you can try to extract the real mbr using
(If your Windows installation is not on sda, please set in the right device).
You can include it using
Replace WIN_PARTITION with your real Windows partitions, 1 for sda1, 1,2 for sda1 and sda2.
You can use the Super Grub2 Disk to boot in VirtualBox.If I do "fix" this with the rescue disc Windows boots in the VM (success!), but if I then boot Windows natively I get the same error and have to "fix" Windows again with the rescue disc! Obviously this is inconvenient (putting it mildly) and feels utterly unsafe (as I've heard running raw is). Any help will be appreciated!
If you are (physically) using dualboot with the Windows bootloader instead of GRUB, you can try to extract the real mbr using
Code: Select all
dd if=/dev/sda of=~/.VirtualBox/WindowsRAW.mbr count=1 bs=512You can include it using
Code: Select all
VBoxManage internalcommands createrawvmdk -filename ~/.VirtualBox/WindowsRAW.vmdk -rawdisk /dev/sda -partitions WIN_PARTITION -mbr ~/.VirtualBox/WindowsRAW.mbr -relative
Raw disk access means, VirtualBox goes directly to the raw hard disk; it doesn't matter if the partition is mounted or not.A couple of things bother me about this:
- The Windows partition (/dev/sda2 on my installation) is mounted as read-only. How can the rescue disc "break" the native installation from within Ubuntu if nothing can be written?
In my article you find some more possibilities to make the virtual hardware similar to the physical hardware. If you're using an OEM version of Windows 7, you may have a look at Windows 7 Licensing and Immutable DisksCan the reporting be more complete so that the guest does not "see" different hardware?
Re: Windows 7 as native and as raw guest on Ubuntu host
The problem I have with this explanation is that my 64-bit Win 7 boots without any fuzz if I enable access to the whole disk. As soon as I limit it to just the win partition I get this error. Does the hardware seen by windows change that much when limiting the partitions it can access?
-
Lauscher
- Posts: 47
- Joined: 14. Mar 2012, 14:19
- Primary OS: Ubuntu other
- VBox Version: VirtualBox+Oracle ExtPack
- Guest OSses: Windows XP, Ubuntu 7.04+10.04, Xubuntu 11.10
- Location: Germany
Re: Windows 7 as native and as raw guest on Ubuntu host
Yes, since two weeks I see this problem, too. It seems to be a problem with the Windows BCD table. If the raw disk access is limited to the Windows partitions, something seems to change in the way Windows recognices the hard disk. Maybe a bug of VirtualBox? If the BCD table gets repaired, Windows is booting without error 0xc000000e, but then the error appears in native boot, because the BCD table doesn't match to the unlimited hard disk.The problem I have with this explanation is that my 64-bit Win 7 boots without any fuzz if I enable access to the whole disk. As soon as I limit it to just the win partition I get this error. Does the hardware seen by windows change that much when limiting the partitions it can access?
I think, Windows reads some IDs (or something else like that) of the partitions it cannot read when it is limited to its own partitions. Another possibility, the IDs of the partitions limited by the -partitons parameter get changed so Windows cannot recognize its own partition.
My solution is now to give Windows access to the whole hard disk and boot it with a limited GRUB CD that only allows to boot Windows. So I avoid booting Linux inadvertently and destroying it. In VirtualBox boot configuration hard disk must be disabled!
This way I make a specified GRUB CD that only shows Windows in the boot menu (you need xorriso to be installed):
Code: Select all
sudo apt-get install xorriso # install xorriso
mkdir -p ~/WindowsRAWgrubiso.temp/boot/grub # create temporary grub folder
sudo chmod -x /etc/grub.d/10_linux # disable Linux
sudo chmod -x /etc/grub.d/20_memtest86+ # disable memtest86+
sudo grub-mkconfig > ~/WindowsRAWgrubiso.temp/boot/grub/grub.cfg # create new grub.cfg
sudo chmod +x /etc/grub.d/10_linux # enable Linux
sudo chmod +x /etc/grub.d/20_memtest86+ # enable memtest86+
# create GRUB CD
sudo grub-mkrescue –-modules=”linux ext2 fat fshelp ls boot pc ntfs” –-output=/home/WindowsRAW_GRUB.iso ~/WindowsRAWgrubiso.temp/
sudo chown $USER /home/WindowsRAW_GRUB.iso # change owner to user
sudo rm -R ~/WindowsRAWgrubiso.temp # delete temporary GRUB folder