On Fri, Jul 13, 2012 at 09:32:21AM -0600, Steve Goodrich wrote:
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).
[...]
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
The problem with this approach is that there is no way to change the drive id of hard drives controlled via option roms (eg, scsi drives). So, if a scsi drive is made 0x80 this scheme does not work at all, and if a scsi drive is not 0x80 there is no way to boot from it.
Thoughts?
I don't think I understand the use case you are trying to address. If a user has a stable set of drives attached they can configure the boot order via the bootorder file. If the user is attaching drives for one-off boots, they can hit F12 and choose which drive to boot from. What is the use case for a user that does not have a stable attachment of drives and is unable to hit F12?
On a technical note, the patch has some implementation issues: the use of "#if"s is undesirable - the compiler can weed out unused code and variables; SeaBIOS no longer uses the EBDA for internal storage - use global variables with the "VARLOW" decoration instead; it's not safe to alter IDMap in the boot phase as global variables are read-only after POST phase ends.
-Kevin