It seems, FreeBSD can't BIOS-boot boxes with too many drives. Is this a known issue in the FreeBSD bootloader? I kinda have to "hide" drives from the BIOS in order to make FreeBSD boot. Trying to boot with 36 disks looks like this: https://ln.tc/s/20260409-105240_2026-04-09-105233_786x456_scrot.png #FreeBSD #bootloader
@FiLiS I’m guessing there’s a good reason why UEFI can’t be used here? because a drive called ] or ‘ is a recipe for future trouble

@dch but UEFI doesn't use drive letters, i'd expect that to work fine here.

@FiLiS

@lw yeah that’s what I meant but apparently I can’t communicate in my native language before midday :-(
@FiLiS
@dch @lw yes, UEFI can't be used, for some reason. I think it's also the controller's fault.

@FiLiS @lw so without really knowing what I'm doing I grepped for 'BIOS drive.+: is' and 'Can not get information' and found bd_int13probe()

https://cgit.freebsd.org/src/tree/stand/i386/libi386/biosdisk.c#n604

/*
* Try to detect a device supported by the legacy int13 BIOS
*/
static bool
bd_int13probe(bdinfo_t *bd)
{

which is called from bd_init()

https://cgit.freebsd.org/src/tree/stand/i386/libi386/biosdisk.c#n336

which does for(.., PTOV(BIOS_NUMDRIVES))

which is 0x475 which appears to be a Magic Number pointing into the BIOS memory space which I guess returns more Magic Numbers from the BIOS already.

AFAICT the bd_int13probe() trucks along until it find a device# that doesn't return a response and then stops.

So device 36 appears to be listed in the PTOV(BIOS_NUMDRIVES) data, but on querying, doesn't have the info that the loader expects https://cgit.freebsd.org/src/tree/stand/i386/libi386/biosdisk.c#n661 so we return false to bd_init() and stop.

Rummaging around there the number of enumerable drives appears to be between 0x80 -> 0xff so 128 drives total, but who knows.

Also, I don't know what character it would try for 0xa7 (base of 0x80 + 37) in bd_init(), it's not even printable ASCII...

Toomas or Warner probably knows what actually happens here.

biosdisk.c « libi386 « i386 « stand - src - FreeBSD source tree

@FiLiS so I would see if it is willing to boot with 1 drive missing, and also see if the boot fails if you re-order the devices (does the device without correct data cause the failure to move around, or maybe it is the firmware returning garbage).

Maybe you need to flash firmware on everything in sight, and hope somewhere this enumeration problem is fixed.