VirtualBox

Ticket #6979 (new defect)

Opened 4 years ago

Last modified 3 years ago

Hard disk boot order

Reported by: Sasquatch Owned by:
Priority: major Component: virtual disk
Version: VirtualBox 3.2.4 Keywords: boot order
Cc: Guest type: other
Host type: other

Description

When you have several hard drives set in your VM and the actual boot disk is SATA or on any other controller than IDE, while you have an IDE hard drive attached, it will fail to boot. There is no way to set the controller priority in the VM settings for booting the VM. The first detected hard drive is tried, but never another if that one fails.

Here is one of the examples, though the issue describes something else too:  http://forums.virtualbox.org/viewtopic.php?f=6&t=31956 The first reply (second post) is the vital one.

It is reported for version 3.2.4, but I think this problem exists in all versions where more controllers are available. It doesn't matter which host or Guest you have. It also appears that the OS you want to boot using the boot menu (F12) may fail.

I have attached two log files, it's the same VM, one where I let it boot without intervention and it just stays on a black screen with a blinking _ and 100% CPU on one core. It tries to boot from a data VDI, it doesn't contain an OS. The second log is where I selected the proper device (AHCI SATA drive) and got the error "A Boot Error Occurred".

Attachments

VBox_failed_boot_non-boot_IDE.log Download (66.9 KB) - added by Sasquatch 4 years ago.
Let it continue without intervention.
VBox_failed_boot_device_chosen.log Download (71.8 KB) - added by Sasquatch 4 years ago.
Selected boot device, failed to boot error appears.

Change History

Changed 4 years ago by Sasquatch

Let it continue without intervention.

Changed 4 years ago by Sasquatch

Selected boot device, failed to boot error appears.

comment:1 Changed 4 years ago by Aikon

If this functionality were to be added, I think it would be worthwhile to actually set the specific boot device (i.e. controller and port), not just the controller. Most BIOSs allow you to specify e.g. "1st HDD", "4th HDD", etc., so this should not be outside the scope of the virtual machine.

This would probably be best stored in the machine's XML definition, with an option in the settings GUI for selecting the specific boot device.

comment:2 Changed 4 years ago by DAE51D

I have to agree that the lack of a "boot" flag in the XML is causing me a lot of grief right now.

I have a .vdi disk that just went bad for some unknown reason. It kernel panics but there IS data on the drive. Luckily I had just exported to .ovf two weeks ago, so I had a .vmdk image handy. I have changed the XML to load the .vmdk and all is fine. NOW I added the .vdi but every time I try and boot, VB ALWAYS tries to boot from the corrupt disk?!?! WTF. I've used F12 and picked "primary" (as it should be) and also "slave" and in BOTH cases, VB always boots the broken kernel .vdi version.

So there is data on the .vdi that I want to get off of it, I figured I'd just boot the .vmdk, mount the .vdi as a second drive and start copying/comparring, but I can't even get that far now. :\

I tried changing the order of the <StorageController> block too just in case, and that had no bearing either. So what the hell? What determines which drive will be booted first??

comment:3 Changed 4 years ago by DAE51D

Okay, I'll recind part of my post. What was REALLY happening for me was that since both the .vdi and the .vmdk were essentially clones of each other, when I was choosing PRIMARY, then GRUB was launching (since both drives had that too) and the root=UUID=9872304871203471023847blahblah was the same UUID and it was getting confused.

Solved by escaping into the grub menu and choosing root=/dev/sda1 which picked the proper partition and drive.

Then I could boot into the working drive and mount /dev/vdi and start copying files to my good drive.

:)

However, I *STILL* think there should be a way to specify the boot drive without having to use F12

comment:4 follow-up: ↓ 5 Changed 4 years ago by chriswolf

You can reconfigure grub to not search for the root device via UUID, but rather by device name, as you suggest, via the grub menu. You can also make this change permanent with the following procedure:

 http://communities.vmware.com/message/1583812#1583812

Note the caveats about device name assignment.

comment:5 in reply to: ↑ 4 Changed 3 years ago by wolf0403

Replying to chriswolf:

You can reconfigure grub to not search for the root device via UUID, but rather by device name, as you suggest, via the grub menu. You can also make this change permanent with the following procedure:

 http://communities.vmware.com/message/1583812#1583812

Note the caveats about device name assignment.

I believe that the original problem was about VirtualBox, which in these cases would not even find the MBR on the SATA disks to load Grub though.

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use