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