Skip to contentSkip to conversation

HVMAssist BIOS boot device problem

DISCUSSION Stephen Quintero 3 participants 3 messages Jul 8, 2008

lore
Share & tools
lore
#0 lore raw

Keir,

Thank you for your reply.

I agree it should be deterministic, according to the enumeration of the devices (hda-hdd), but, alas, it is not.

See example B in my original post where hda|hdb|hdc all contain active partitions but the guest boots from hdc.

See also example A in my post where hda is always a bootable image but sometimes the guest boots from hdb (you may not easily recreate this scenario yourself, but example B is simple to reproduce).

Stephen

-----Original Message-----
From: Keir Fraser [mailto:[email protected]]
Sent: Tuesday, July 08, 2008 2:12 AM
To: Stephen Quintero; [email protected]
Cc: Apoorva Kulkarni; Minh Quach; Eric Tessler
Subject: Re: [Xen-devel] HVMAssist BIOS boot device problem

Quoted 3 lines · Stephen Quintero

Is there any method to cause an HVM guest to reliably boot from hda?

Any insight would be appreciated.

Reading the BIOS code, my understanding is that 'boot from hard disk' means
to boot from the first connected hard drive enumerated in the following
order: primary master, primary slave, secondary master, secondary slave (i.e., hda-hdd). I confirmed this with a few simple tests -- attach a bootable image to hdd boots fine, but if I connect a non-bootable image on
any of hha-hdc then the system fails to boot. This is all entirely deterministic. Selection of boot device should not be random, nor change across reboots.

-- Keir

#1 lore raw
Quoted 2 lines · Stephen Quintero

See example B in my original post where hda|hdb|hdc all contain active partitions but the guest boots from hdc.

I checked an example where hda was not bootable yet hdd was. In that case the BIOS wanted to boot from hda, and failed, and that was that. I'm afraid that, plus reading the BIOS code, was as far as I went in trying to repro this oddness.

-- Keir

#2 lore raw
In reply to Stephen Quintero
Quoted 6 lines · Stephen Quintero

Keir,

Thank you for your reply.

I agree it should be deterministic, according to the enumeration of the devices (hda-hdd), but, alas, it is not.

Realize that Xen (QEMU BIOS) is only determining which MBR is loaded and executed. After that you are at the mercy of the boot loader in question. Windows in particular doesn't "support" multiple visible system partitions, or rather, doesn't specify the selection of the appropriate system partition. In your example B below, if you destroy the boot block on hda, you will fail to boot anything. If you "hide" all windows partitions on hdb/hdc/hdd, you will indeed boot the system volume on hda. This is exactly what many multiboot boot loaders do. The partition tables are usually modified in memory only, not on the physical disk itself.

Steve

Quoted 41 lines

See example B in my original post where hda|hdb|hdc all contain active partitions but the guest boots from hdc.

See also example A in my post where hda is always a bootable image but sometimes the guest boots from hdb (you may not easily recreate this scenario yourself, but example B is simple to reproduce).

Stephen

-----Original Message-----
From: Keir Fraser [mailto:[email protected]] Sent: Tuesday, July 08, 2008 2:12 AM
To: Stephen Quintero; [email protected]
Cc: Apoorva Kulkarni; Minh Quach; Eric Tessler
Subject: Re: [Xen-devel] HVMAssist BIOS boot device problem

Quoted 3 lines · Stephen Quintero

Is there any method to cause an HVM guest to reliably boot from hda?

Any insight would be appreciated.

Reading the BIOS code, my understanding is that 'boot from hard disk' means
to boot from the first connected hard drive enumerated in the following
order: primary master, primary slave, secondary master, secondary slave (i.e., hda-hdd). I confirmed this with a few simple tests -- attach a bootable image to hdd boots fine, but if I connect a non-bootable image on
any of hha-hdc then the system fails to boot. This is all entirely deterministic. Selection of boot device should not be random, nor change across reboots.

-- Keir

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel