[SeaBIOS] Bootorder Failover (Patch)

Steve Goodrich steve.goodrich at se-eng.com
Fri Jul 13 17:32:21 CEST 2012


Legacy MBRs on HDDs and USB MSCs allow booting only from device id 0x80.
This is OK for platforms that have only one HDD or USB device to boot from,
but causes problems if the end user wants to have more than one HDD or USB
MSC device in the boot order (and if those devices are present, but not
bootable).

This patch allows proper failover from one HDD/USB MSC device to the next.

Assume the platform has the following devices in its bootorder file:
  HDD1   (present, no MBR/not bootable)
  HDD2   (present but unreadable)
  Floppy (not present)
  USB1   (present, no MBR/not bootable)
  USB2   (present, bootable)
The current/previous bootorder handling would set HDD1 as drive 0x80, and
it would be the only HDD or USB upon which booting would be attempted.
Since it has no MBR, the system would not boot (the Floppy is not present,
and none of the other drives would be tried).

With the code in this patch, the system would behave like this:
* Assign HDD1 as device 0x80 and attempt to boot
* boot fails because the device is not bootable
* Rotate the boot order to be HDD2, Floppy, USB1, USB2, HDD1, making HDD2
  device 0x80
* Attempt to boot
* boot fails because the device is unreadable
* Reset the boot order to its original while we try (and fail) booting from
  the Floppy
* Rotate the boot order to be USB1, USB2, HDD1, HDD2, Floppy, making USB1
  device 0x80
* Attempt to boot
* boot fails because the device has no MBR
* Rotate the boot order to be USB2, HDD1, HDD2, Floppy, USB1, making USB2
  device 0x80
* Attempt to boot
* boot succeeds with the current device order (USB2=0x80, HDD1=0x81, HDD2=
  0x82, Floppy=0x00, USB1=0x83)

NOTE: This behavior is controlled via the BOOTORDER_FAILOVER selection in
Kconfig.

Thoughts?
	-- Steve G.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Enable-bootorder-failover.patch
Type: application/octet-stream
Size: 12244 bytes
Desc: not available
URL: <http://www.seabios.org/pipermail/seabios/attachments/20120713/035fa194/attachment.obj>


More information about the SeaBIOS mailing list