Gentoo Archives: gentoo-user

From: gevisz <gevisz@×××××.com>
To: "gentoo-user@l.g.o" <gentoo-user@l.g.o>
Subject: Re: [gentoo-user] Kernel does not boot after adding a new SATA drive
Date: Wed, 07 Sep 2016 11:57:45
Message-Id: CA+t6X7fVyKR3EJ0-vBEJCLRwqi=pmnWPGkEj7YKHAK1EaBrcbw@mail.gmail.com
In Reply to: Re: [gentoo-user] Kernel does not boot after adding a new SATA drive by Rich Freeman
1 2016-09-07 12:36 GMT+03:00 Rich Freeman <rich0@g.o>:
2 > On Tue, Sep 6, 2016 at 11:36 PM, Mike Gilbert <floppym@g.o> wrote:
3 >>
4 >> grub-mkconfig is not finding an initramfs, as evidenced by the lack of
5 >> an "initrd" in in grub.cfg.
6 >>
7 >> If it is unable to find an initramfs, it will always output
8 >> root=/dev/sdX instead of root=UUID=...
9 >>
10 >
11 > For whatever reason the three subsequent replies to this list ignored
12 > the actual explanation of the cause of the problems, which was this
13 > (not uncommon on this list it seems).
14 >
15 > This is also why it is helpful to post actual config files when you
16 > have problems. The lines you consider most relevant aren't
17 > necessarily the ones containing the clues.
18 >
19 > When root=UUID=... was added manually to the command line, then the
20 > kernel refused to boot at all, because the kernel itself doesn't
21 > understand that syntax.
22
23 Yes, when the "root=UUID=***" has been added manually to /etc/default/grub
24 in the wrong way, it appeared in the GRUB menu entry in the wrong way that
25 stopped GRUB from booting in any case...
26
27 > So, the next question becomes, how are you generating an initramfs,
28 > and how is it named? Pasting the output of "ls /boot" might be
29 > helpful here.
30
31 I generate initramfs by
32 # genkernel --install initramfs
33 and the rename it to match the name of the kernel, eg,
34 initramfs-4.4.6-gentoo
35 vmlinuz-4.4.6-gentoo
36
37 But I think that this is unrelevant to the problem because of the following
38 explanation I have just posted. (If I am wrong here, please, let me know
39 and I will post all the conf files you will ask.)
40
41 When I connected a new SATA disk to the SATA controller, the order of
42 hard disks during the boot time changed because the new disk "jumpt
43 in front" of the boot drive. As the result, the GRUB could not find the
44 boot partition by its UUID on the "wrong" non-boot drive and gave up,
45 without even trying to look for the boot partition by its UUID on other
46 hard drives!
47
48 When I connected the new hard disk after the boot, it (predictably)
49 did not "jumped in front" of other hard disks. So, doing
50 # grub-mkconfig -o /boot/grub/grub.cfg, creating a new initramfs,
51 etc, did not helped the GRUB to boot the system next time...
52
53 Only after I managed to boot the system manually editing the GRUB
54 menu entry during the boot time and the system booted with the new
55 hard disk connected, that in this case took its "usual" order, and then run
56 # grub-mkconfig -o /boot/grub/grub.cfg, the problem has been "solved."
57
58 Here, I am writing the "solved" in quotes because it has been solved
59 only for me and only on this computer: next time, when I or someone
60 else will add a new disk to any linux computer the problem may appear
61 again.
62
63 So, the question remains: why not to desing the GRUB in such a way
64 that it could look for the boot partition by its UUID on any available
65 hard drives?

Replies