Windows raw disk is not bootable

Discussions related to using VirtualBox on Linux hosts.
Post Reply
nobodyfamous
Posts: 14
Joined: 26. Sep 2012, 22:06

Windows raw disk is not bootable

Post by nobodyfamous »

I am trying to run a windows 10 installation off a raw disk. Virtualbox says "FATAL: No bootable medium found! System halted." If I enable EFI it drops to the grub shell.

A quick history, I previously had this computer set up as dual boot, windows Ubuntu. I would boot into Ubuntu and then run windows in VB. In order to do that I had to "raw disk" both HDD and select windows from grub in the virtual machine. no problems. This was bad because if I missed the menu, and it booted into Ubuntu things get corrupted in a hurry.

So ...

I booted into windows, ran 'bootsect ..." and "fixed" the windows disc. (removed grub so I thought). Then I removed the Ubuntu HDD and booted into Windows. works fine. Push power wait forever and bam, windows.

So now I removed the windows HDD and added the Ubuntu HDD back in, and REINSTALLED Ubuntu, fresh, new grub new os new all of it. GRUB has no idea windows might be around.

Now I reinstalled the windows HDD and I can boot into either OS via the BIOS (press F12, choos Ubuntu or Winodws)

Sooooooo both disks ARE bootable in their own right. I can insert or choose either disk and it just boots!!!

Why won't Virtualbox boot my Windows HDD as a raw disk?
the raw disk was created by

Code: Select all

VBoxManage internalcommands createrawvmdk -filename ./rawWindowz.vmdk -rawdisk /dev/sda
sda is windows, sdb is ubuntu w/grub, sdc is my backup hdd for Ubuntu.
scottgus1
Site Moderator
Posts: 20945
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows, Linux

Re: Windows raw disk is not bootable

Post by scottgus1 »

Did you try remaking the raw disk .vmdk after you refreshed the Windows disk's boot loader? Take a look here for a glimpse as to what's in that .vmdk viewtopic.php?f=7&t=95158#p460320 There's UUIDs to account for. Maybe something in that file is pointing to the wrong place.
nobodyfamous
Posts: 14
Joined: 26. Sep 2012, 22:06

Re: Windows raw disk is not bootable

Post by nobodyfamous »

After MANY searches, and seemingly random attempts to make this work, I may have the solution. I just need to make it work twice in a row, then I'll post whats up.
nobodyfamous
Posts: 14
Joined: 26. Sep 2012, 22:06

Re: Windows raw disk is not bootable

Post by nobodyfamous »

okay, so this was crazy stupid, and virtualbox needs a beeter way of figuring out how this EFI stuff is automagically done.

what I could make work exactly one time in a row was to "exit" into the EFI menu and do a boot from file. I can navigate to EFI\Microsoft\Boot and choose "bootmgfw.efi" - this would boot into Windows no problem. But it only works once in a row! PITA.

A lot more searching got me nowhere. I relized I was landing on a GRUB menu, with nothinkg configured. there is a \EFI\ubuntu folder. I deleted it, and this just got worse. The loading screen would just fail and flash and be caught in a loop.

I started the VM and paused it right away to see what the first message flashing on screen was. I don't remeber but it basicly said it was failing back to "ubuntu" and a file "shimx64.efi"

What I did was renamed that file to "shimx64.efi.bak" and then copied my windows "bootmgfw.efi" file into the ubuntu folder and renamed it "shimx64.efi"

Now the VM will automatically just boot to Windows every time. And I can nativly boot to either OS from my system BIOS boot selection as well.

PITA, none of this is documented. If only I could simply save the EFI settings in a config file or something.
socratis
Site Moderator
Posts: 27329
Joined: 22. Oct 2010, 11:03
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Win(*>98), Linux*, OSX>10.5
Location: Greece

Re: Windows raw disk is not bootable

Post by socratis »

Haven't tried it myself, but try to search for "startup.nsh site:virtualbox.org"...
Do NOT send me Personal Messages (PMs) for troubleshooting, they are simply deleted.
Do NOT reply with the "QUOTE" button, please use the "POST REPLY", at the bottom of the form.
If you obfuscate any information requested, I will obfuscate my response. These are virtual UUIDs, not real ones.
Post Reply