1 |
On 2013-07-01, Paul Hartman <paul.hartman+gentoo@×××××.com> wrote: |
2 |
> On Mon, Jul 1, 2013 at 4:52 PM, Grant Edwards <grant.b.edwards@×××××.com> wrote: |
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 wonder if it could be related to parallel initialization of disks. |
12 |
|
13 |
Apparently so. |
14 |
|
15 |
> I think there's a kernel toggle for that. |
16 |
|
17 |
I'll look into it. |
18 |
|
19 |
>> Are we really expected now to set up an initrd just so that the |
20 |
>> kernel can find the root partition?? |
21 |
> |
22 |
> As far as I know, the answer is "yes". |
23 |
> |
24 |
> FWIW, I always resisted making an initrd until very recently, but |
25 |
> wanted to use UUID in my bootup on my new system. I used this command |
26 |
> (which I re-run whenever I deploy a new kernel): |
27 |
> |
28 |
> dracut -H -o i18n -o resume -o usrmount --force /boot/initramfs.img |
29 |
> |
30 |
> And then added one line to my grub2 config: |
31 |
> |
32 |
> initrd /initramfs.img |
33 |
> |
34 |
> and it just simply works... though it's still a bit of black magic to |
35 |
> me, |
36 |
|
37 |
It's not really that complex. There are two ways to get the kernel to |
38 |
use an initial ram fs as root: the bootloader loads the initial ram |
39 |
image into ram or it gets linked into the kernel when the kernel is |
40 |
built. |
41 |
|
42 |
> and every time I reboot I feel a bit of nervousness when I see |
43 |
> "Loading initial ramdisk..." and don't breathe until it succeeds. :) |
44 |
|
45 |
I've got nothing against initramfs -- on my embedded systems root |
46 |
starts out as an initramfs and stays that way. I just don't see why I |
47 |
should be forced to have one. |
48 |
|
49 |
-- |
50 |
Grant |