This is a continuation of the thread Boot and shutdown timing. Bryan Kadzban wrote:
> If you use /dev/sd??, then I wish you the best of luck the next time > the kernel's disk discovery order changes. Because it's not > guaranteed to remain the same forever, and so when it changes, your > system won't be bootable. Your comment made me curious. I wanted to look at how the kernel decided to add devices. What I found out is that the built in kernel drivers are run one at a time in link order. init/main.c: function do_initcall_level(int level) for (fn = initcall_levels[level]; fn < initcall_levels[level+1]; fn++) do_one_initcall(*fn); Now, within a driver, I do not think the initialization of multiple devices would be asynchronous, but would be stepped through one at a time. I haven't tried to read through the driver code though. Of course it would be easy to move usb drives around or even map sata devices differently in the bios, but as long as these type of things don't change, it appears the naming should be constant. I did find a reference via Google that suggests the order the drivers are called is established at link time. That's not to say that this will always be the case, but I think we would see some publicity about random ordering of drives and the requirement to use labels or uuids in the fstab. I'll also note that the kernel cannot use uuids or labels to mount the root fs without an initrd. Making an initrd required would also become well known reasonably quickly. -- Bruce -- http://linuxfromscratch.org/mailman/listinfo/lfs-dev FAQ: http://www.linuxfromscratch.org/faq/ Unsubscribe: See the above information page