Page 1 of 1

Windows raw disk is not bootable

Posted: 17. Oct 2019, 19:12
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.

Re: Windows raw disk is not bootable

Posted: 18. Oct 2019, 03:54
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.

Re: Windows raw disk is not bootable

Posted: 18. Oct 2019, 17:09
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.

Re: Windows raw disk is not bootable

Posted: 18. Oct 2019, 18:38
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.

Re: Windows raw disk is not bootable

Posted: 20. Oct 2019, 10:29
by socratis
Haven't tried it myself, but try to search for "startup.nsh site:virtualbox.org"...