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