[SeaBIOS] [Resend][Seabios PATCH] don't boot from un-selected devices
kevin at koconnor.net
Wed Dec 19 17:39:38 CET 2012
On Wed, Dec 19, 2012 at 03:24:45PM +0800, Amos Kong wrote:
> Current seabios will try to boot from selected devices first,
> if they are all failed, seabios will also try to boot from
> un-selected devices.
> For example:
> @ qemu-kvm -boot order=n,menu=on ...
> Guest will boot from network first, if it's failed, guest will try to
> boot from other un-selected devices (floppy, cdrom, disk) one by one.
> Sometimes, user don't want to boot from some devices. This patch changes
> seabios to boot only from selected devices.
> If user choose first boot device from menu, then seabios will try all
> the devices, even some of them are not selected.
The BIOS Boot Specification (BBS) is quite complex and your patch
changes SeaBIOS' behavior in subtle ways that I'm not convinced is
safe. (For example, by not always adding an FD/HD entry it may no
longer be possible to boot from a legacy option rom which emulates an
Instead of altering the core algorithm for this feature, a different
approach would be to add a new "boot device" (eg, IPL_TYPE_HALT) that
is only registered if found in the bootorder file and just calls
boot_fail() when attempted. That way users get the default behaviour
unless they explicitly request a halt in boot at a given priority.
More information about the SeaBIOS