[olug] Drive letter assignments

Kevin D. Snodgrass kdsnodgrass at yahoo.com
Thu Apr 14 01:13:47 UTC 2011


--- On Wed, 4/13/11, Rob Townley <rob.townley at gmail.com> wrote:
> Kevin, do you have an account at bugzilla.redhat.com....

No, I don't think so.  I consider this to >NOT< be a bug, just the way things are with the new udevd plus parallel driver initializaion.  I understand the usefulness of udev, sort of.  (Why are people worried about /dev being populated with thousands of entries?  They don't take up much space, just entries in the /dev directory...)

This is how I think it works:  During kernel boot different drivers "complete" their initialization and any basic configuration at somewhat random order.  Yes, some will be done fast, others slow.  But since many of these drivers (a.k.a. kernel modules) are loaded and run in parallel their completion times cannot be guaranteed, thus sometimes driver 'A' finishes before driver 'B', other boots they are reversed.

When a specific driver has completed its init, it signals the kernel that there is an available device of a certain type.  Dealing with hard drives, these of course will be block devices.  The kernel, via udev, then assigns nodes in the /dev tree in the order that they become available from the drivers.  If the USB driver presents the kernel with an available block device before the SATA/PATA driver, then the USB block device gets assigned /dev/sda, since it was first.  Thus on my laptop, I get external block devices (USB attached hard drives, USB keys, etc..) as /dev/sda most of the time, and my internal drive as /dev/sdb.  If I have both a USB drive and a USB key, then the internal drive gets /dev/sdc.

If my understanding of the boot process is correct, the "fix" is to either "de-parallelize" this process, thus slowing down boot times, or create udev rules to a force certain behaviour.  Neither is particularly palatable to me, but custom udev rules are easier to bring over to a new install (either a different distro or a new version of the same distro) than would the "de-parraleling" routine.  Not even sure where to start with that one and it may break something else, possibly in a very subtle way, leading to much gnashing of teeth and pulling of hair at some point in the future...


Kevin D. Snodgrass




More information about the OLUG mailing list