Gentoo Archives: gentoo-user

From: Alan McKinnon <alan.mckinnon@×××××.com>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Kernel does not boot after adding a new SATA drive
Date: Tue, 06 Sep 2016 20:10:31
Message-Id: 4292f04b-f6c3-12ef-e188-d41f401e453c@gmail.com
In Reply to: Re: [gentoo-user] Kernel does not boot after adding a new SATA drive by gevisz
1 On 06/09/2016 21:39, gevisz wrote:
2 > 2016-09-06 22:08 GMT+03:00 Rich Freeman <rich0@g.o>:
3 >> On Tue, Sep 6, 2016 at 3:01 PM, gevisz <gevisz@×××××.com> wrote:
4 >>>
5 >>> I have already looked into this file but did not find where to set the
6 >>> UUID of the root partion.
7 >>>
8 >>
9 >> It depends. :)
10 >>
11 >> Usually you end up with root=UUID=abc on your kernel command line. It
12 >> looks like grub-mkconfig is supposed to do this automatically.
13 >
14 > I do agree and suspect that it is a bug in grub-mkconfig.
15 >
16 > Why otherwise adding a new unformatted disk to the system
17 > should prevent grub from finding a root (and boot :) partition
18 > if it already been set in fstab?
19
20
21 Easy. BIOS/efi and/or udev has decided to renumber your drives and give
22 them different node names.
23
24 All my Dell laptops are like that - firmware sees the ssd as the first
25 drive and that's the name grub uses. The kernel and udev see them in the
26 opposite order so auto tools for grub always get it wrong.
27
28 It's common, nothing to get upset about. It's one of the reasons why
29 udev does the tricks it does.
30
31
32
33
34
35 >
36 >> Your initramfs tool may also do something here (I know dracut sticks a
37 >> copy of your fstab in the initramfs and uses it to help find the root
38 >> partition, assuming you have root in your fstab (if not it will
39 >> probably yell at you at some point)).
40 >>
41 >> You have to use an initramfs to use a UUID to mount your root.
42 >
43 > I do use initramfs (created by genkernel) as the system refuses
44 > to boot without it.
45 >
46 > I have already thought about it.
47 >
48 > Do you think that I should recreate initramfs anew after adding
49 > a new hard disk?
50 >

Replies