Hi Kevin, Thanks for your response!
I have tested this successfully against grub (specifically GRUB 2) Since you asked I went digging for the relevant code in grub - here is the line of code that will validate range of acceptable DL values and if acceptable jump ahead to boot from that disk and skip hardcoding DL to 0x80: https://github.com/coreos/grub/blob/master/grub-core/boot/i386/pc/boot.S#L22...
So for example if bios were to set DL to 0x81 (by fallback logic in the patch) that will be acceptable to grub
On Fri, Jul 7, 2017 at 7:55 AM, Kevin O'Connor kevin@koconnor.net wrote:
On Fri, Jun 30, 2017 at 08:48:27PM -0400, Gaurav Poothia wrote:
If multiple disks in boot order and first is unbootable then fallback to other disks in list.
[...]
@@ -731,7 +736,10 @@ do_boot(int seq_nr) break; case IPL_TYPE_HARDDISK: printf("Booting from Hard Disk...\n");
boot_disk(0x80, 1);
if (ie->hdid == -1)
boot_disk(0x80 , 1);
else
case IPL_TYPE_CDROM: boot_cdrom((void*)ie->vector);boot_disk(0x80 + ie->hdid, 1); break;
Ultimately, what this patch does is set the DL register to something other than 0x80. I tested this approach a few years ago, and at the time I could not find a single bootloader that used DL. What bootloaders did you test with this, and which ones worked and did not work?
-Kevin