On 2013-07-01, Grant Edwards <grant.b.edwa...@gmail.com> wrote: > I've just recently run into a problem where sometimes when a machine > boots, the kernel can't find init. This appears to be because my grub > configuration line says "root=/dev/sda5" and _sometimes_ the drive > that contains my root partition is sdb instead of sda. AFAICT, for the > past 30 years the linux kernel was 100% consistent in the order that > hard drives were labelled -- but recently that has seems to have > changed.
I still haven't figured out why my drives suddenly started getting discovered in varying orders. I think that the SATA drives are always in the same order with respect to each other, but sometimes the external firewire drive gets discovered before the SATA drives and sometimes after the SATA drives. It looks like my options are: 1) Keep hitting the reset button until it works. 2) Unplug or power down the firewire drive when booting. 3) Set up an initrd for the sole purpose of finding the actual root parition via filesystem label. [I find this idea rather offensive.] 4) Build the firewire drive as a module instead of building it into the kernel. That would delay the discovery of the firewire drive until after root has been mounted. 5) For the drive with the root parition on it switch from a DOS parition table to a GPT partition table and use the root=PARTUUID=<whatever> kernel option. 6) Fix the kernel so it can find root by looking at filesystem labels. Number 6 (fixing the kernel) is The Right Thing To Do(tm), but it's a bit out of scope for the momement. The "early code" in the kernel obviously knows how to read partition tables and also knows about the relevent file system, so I'm a bit baffled why it can't look at the file system label. Changing the firewire driver to be a module is probably the simplest solution, but it's a kludgy work-around for what is, in my opinion, a kernel bug: if you are going to require people to specify an absolute disk drive index for the root partition, then you'd better index drives in a consistent order from one boot to the next. Switching to a GPT partition table sounds like the cleanest solution, but I need to figure out if the grub (legacy) ebuild includes GPT support or not. I know it's supported by grub2, but I don't really feel like switching to grub2 ATM. -- Grant Edwards grant.b.edwards Yow! But was he mature at enough last night at the gmail.com lesbian masquerade?