Naming conventions for disk drives

Juergen Beisert jbe at pengutronix.de
Fri Nov 20 07:17:09 EST 2009


On Freitag, 20. November 2009, Alessandro Rubini wrote:
> >> > > "disk0" is the whole drive, "disk0.0"..."disk0.3" are the
> >> > > partitions.
> >> > >
> >> > > Any better ideas?
> >> >
> >> > why not keep the kernel convention?
> >
> > I think sdx will the best as it's now use for usb, scsi, sata etc...
>
> If this is for the crappy bios, let's keep different names. Like grub
> does (not that grub is a good example, in general).  Actually, he
> original proposal looks like grub, but done with a better syntax and
> no redundant parenthesis.
>
> AFAIK there is no guarantee the kernel will enumerate them in the same
> order as the crappy bios. Managing a system at the two levels using
> the same name pattern but conflicting istances becomes a pain. I much
> prefer a separate pattern.

Yes. If I'm using the BIOS to gain access to the disk drives I have to use 
0x80 for the first drive, 0x81 for the second aso.
But the drive behind the 0x80 number must not correspond to "sda" in linux. 
What drive is the first one depends on BIOS settings. So, if one configures 
the BIOS to boot from a USB stick instead from an IDE drive, the USB device 
will be (AFAIK) 0x80, and the IDE drive 0x81 (or something different).

Could "biosdisk" be a better name? To show this device is defined by BIOS 
settings (and nothing else)?

Later with a native IDE/ATA driver we could use Linux's naming convention.

jbe

-- 
Pengutronix e.K.                              | Juergen Beisert             |
Linux Solutions for Science and Industry      | Phone: +49-8766-939 228     |
Vertretung Sued/Muenchen, Germany             | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686              | http://www.pengutronix.de/  |




More information about the barebox mailing list