Running Windows from first (and second) partition - how to skip GRUB?
Posted: 27. Sep 2016, 00:48
Hi there,
I am using VirtualBox in a Ubuntu 16.04 environment on a ThinkPad Intel i5 notebook. My aim is to run the pre-installed Windows 7 "Professional" in a virtual machine. When I installed Ubuntu, I resized the original windows system partition to make room for Linux, but left it otherwise untouched. The drive sda now has the following partitions:
I followed the guide about "Using a raw host hard disk from a guest" in chapter 9.9 of the documentation and succesfully booted Windows in the virtual machine. It is working very well.
Except that it always loads the GRUB bootloader first. For comprehensible reasons, I want to boot Windows in VBox directly and so I followed the instructions to mount partitions as described in chapter 9.9.1.2, but either way I try, it does not work.
By the way, I don't know where else to mention: The documentation lacks some information about where to get a "winxp.mbr" boot sector file. They should mention that it can be created with the command
I tried giving access to sda1 and sda2 (the Windows partitions) only, but to my surprise I am only getting a GRUB rescue prompt. When installing Ubuntu, I think there was a question about placing an emergency GRUB bootsector on the first partition and I think I should not have done this. Maybe booting Windows will work when the original Windows bootsector is installed on partition sda1 ??
But also, VBox has this option to use an alternative file as bootsector. Using the command mentioned above, I created bootsectors to boot from default, first or second partition and tried them all; but the closest I get to Windows this way is a Bluescreen at startup ("Windows-Start-Manager") status 0xc000000e stating that it cannot access a neccessary device.
Any ideas? If it won't work with partition vmdk's, is there a way to give a parameter from VBox to GRUB to boot a certain OS entry?
I am using VirtualBox in a Ubuntu 16.04 environment on a ThinkPad Intel i5 notebook. My aim is to run the pre-installed Windows 7 "Professional" in a virtual machine. When I installed Ubuntu, I resized the original windows system partition to make room for Linux, but left it otherwise untouched. The drive sda now has the following partitions:
Code: Select all
sda1 - Windows Boot
sda2 - Windows System
sda3 - Extended
- sda5 - Linux System
- sda6 - SwapExcept that it always loads the GRUB bootloader first. For comprehensible reasons, I want to boot Windows in VBox directly and so I followed the instructions to mount partitions as described in chapter 9.9.1.2, but either way I try, it does not work.
By the way, I don't know where else to mention: The documentation lacks some information about where to get a "winxp.mbr" boot sector file. They should mention that it can be created with the command
Code: Select all
install-mbr [-p <partition number to boot>] --force winxp.mbrBut also, VBox has this option to use an alternative file as bootsector. Using the command mentioned above, I created bootsectors to boot from default, first or second partition and tried them all; but the closest I get to Windows this way is a Bluescreen at startup ("Windows-Start-Manager") status 0xc000000e stating that it cannot access a neccessary device.
Any ideas? If it won't work with partition vmdk's, is there a way to give a parameter from VBox to GRUB to boot a certain OS entry?