AHCI driver and static device names

perryh at pluto.rain.com perryh at pluto.rain.com
Thu Dec 15 09:11:21 UTC 2011

CyberLeo Kitsana <cyberleo at cyberleo.net> wrote:
> On 12/14/2011 03:18 PM, Rob wrote:
> > Case in point.  I have a system with 15 drives in it.  I decided
> > I wanted to install on the 2nd device instead of the 1st, but
> > I partitioned all the other 14 drives.  I completed installation
> > and when to boot the system and it failed.  Stupid me, the GPT
> > boot loader found disk1 with a partitioning scheme but no fs.
> > So, I popped out disk 1 and when to boot again.  Hey, now it
> > starts to boot only to fail to find the root fs because it's
> > looking on ada1 and the fs is on ada0.  That is a mess.
> Sounds like a bug in the BIOS or boot loader. The boot loader
> should be able to ask the BIOS for the device from which it
> read the boot code, and use that instead of just naively using
> the first available device in the system ...

The BIOS does pass the BIOS disk number (0x80, 0x81, ...) to the
bootloader.  That's fine as long as the bootloader is using BIOS
calls to read the disk, but how does the BIOS disk number get
mapped, reliably, to an OS device identification?  The BIOS can't
do it, because it knows nothing about the OS, so the OS would have
to do it => the OS must know a lot of detail about every BIOS on
which it will ever run.  This does not seem very practical, and
that's at least part of the reason why labels were invented.

I suppose if someone wanted to track down the "official" way of
solving this problem, they could look into how Windows handles it.

More information about the freebsd-questions mailing list