Booting a Local Windows 7 64bit EFI from a Raw Disk VMDK
Posted: 23. Jan 2013, 23:51
I've got a pretty complicated setup, but I'll work through bringing you up to speed. Here's what my disk, /dev/sdb, looks like:
The disk is a hardware RAID virtual device. Partition 1 is unformatted space for a legacy GRUB BIOS bootloader no longer being used. Partition two is my FAT-32 EFI boot partition. (This is how I'm booting. I have rEFInd as a boot manager allowing me to switch between Windows 7 and my Linux installation on boot) Partition 3 is my main Linux filesystem. Partition 4 is the msftres partition used by Windows 7. Finally, partition 5 is the NTFS Windows boot drive. It contains Windows 7 64bit SP1. I can boot to either my Linux installation or to my Windows 7 installation on physical machine startup, so boot definitely works. GRUB BIOS boot works too, but only for Linux, as Windows 7 in installed in GPT/EFI mode.
What I'd like to do is to simply boot my Windows 7 installation on /dev/sdb5 from within my Linux operating system using VirtualBox. I've done the following to get things rolling:
That allows me to access my disks as a non-root user. Followed by a log out and a log back in...
Great, the groups modification worked. Now, let's create a raw disk file:
Cool, now, add that to the Windows 7 virtual system in the VirtualBox UI and then enable EFI booting.
Now, onto the problematic stuff...
Ok, so now that our Windows 7 64bit virtual system is ready to go, let's boot.

Ok, fine, so that's not working, so let's type "exit" and get to the console. I select "Boot Maintenance Manager," then "Boot from File," and I select "ESP:/EFI/Microsoft/Boot/bootmgfw.efi", and then I see this terrible, terrible screen:

What is this problem being caused by and how do I get around it? I feel like I'm so close to booting my Windows 7 installation from within my Linux installation.
PS: I've tried also using the Windows 7 installation CD to try and do a startup repair in case something was wrong there, but it prompts me to reinstall Windows, apparently not finding the Windows installation at all. Additionally, I've verified that it's definitely working, as it CAN boot into the rEFInd manager, but I get the same code above when I then try to boot into Windows.
Code: Select all
Model: INTEL RS2BL080 (scsi)
Disk /dev/sdb: 1020GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 5000kB 4983kB primary bios_grub
2 5243kB 530MB 524MB fat32 boot
3 530MB 752GB 752GB btrfs
4 752GB 752GB 134MB Microsoft reserved partition msftres
5 752GB 1020GB 268GB ntfs Basic data partition
What I'd like to do is to simply boot my Windows 7 installation on /dev/sdb5 from within my Linux operating system using VirtualBox. I've done the following to get things rolling:
Code: Select all
$ sudo usermod -a -G disk myuserCode: Select all
$ id
uid=1000(myuser) gid=1000(myuser) groups=1000(myuser),4(adm),6(disk),24(cdrom),27(sudo),46(plugdev),109(lpadmin),123(sambashare),124(vboxusers)Code: Select all
VBoxManage internalcommands createrawvmdk -filename ".VirtualBox/Hard Disks/Windows 7 Local.vmdk" -rawdisk /dev/sdbNow, onto the problematic stuff...
Ok, so now that our Windows 7 64bit virtual system is ready to go, let's boot.

Ok, fine, so that's not working, so let's type "exit" and get to the console. I select "Boot Maintenance Manager," then "Boot from File," and I select "ESP:/EFI/Microsoft/Boot/bootmgfw.efi", and then I see this terrible, terrible screen:

What is this problem being caused by and how do I get around it? I feel like I'm so close to booting my Windows 7 installation from within my Linux installation.
PS: I've tried also using the Windows 7 installation CD to try and do a startup repair in case something was wrong there, but it prompts me to reinstall Windows, apparently not finding the Windows installation at all. Additionally, I've verified that it's definitely working, as it CAN boot into the rEFInd manager, but I get the same code above when I then try to boot into Windows.