Gentoo Archives: gentoo-dev

From: Thomas Deutschmann <whissi@g.o>
To: gentoo development <gentoo-dev@l.g.o>
Cc: pr <pr@g.o>
Subject: [gentoo-dev] News item: Multiple root kernel command-line arguments
Date: Wed, 05 Aug 2020 12:03:15
Message-Id: 3a46dff2-5ee3-14ca-480d-708715a5de9d@gentoo.org
1 Hi,
2
3 please review the news item below:
4
5 - I am not 100% happy with the title but the 50 char limit
6 doesn't allow any more details.
7
8 - No Display-If condition because it is neither a genkernel nor
9 kexec-tools issue. We maybe even have additional packages
10 which are appending to kernel command-line I am not aware of.
11
12 - In theory this shouldn't be a news for anyone: If you don't
13 use a persistent device name, you are basically asking for
14 troubles like that. However, people just using kexec from
15 kexec-tools package maybe unaware that auto-detection of
16 ROOT device which is the default might cause trouble like
17 that because it won't use persistent names.
18
19 - Experiencing a boot failure is always bad -- especially for
20 headless/remote systems so a warning shouldn't hurt.
21
22 - Latest kexec-tools ebuild in repository now also warns user
23 in pkg_postinst, see
24 https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-apps/kexec-tools/kexec-tools-2.0.20-r3.ebuild?id=61c03ffab76740c0420e3c8a3185d047d461f7a7#n111
25
26
27 ---
28 Title: Multiple root kernel command-line arguments
29 Author: Thomas Deutschmann <whissi@g.o>
30 Posted: 2020-08-05
31 Revision: 1
32 News-Item-Format: 2.0
33
34 Due to genkernel-4.1 development which is changing device manager
35 from MDEV to (E)UDEV it was noticed that some tools like kexec
36 append an additional root argument to kernel command-line. If these
37 tools will set root to a non-persistent device name like
38 root=/dev/dm-3, the next boot might fail if there is *no* root device
39 named like that in start environment (i.e. initramfs).
40
41 While kexec's runscript was changed in >=sys-apps/kexec-tools-2.0.20-r2
42 to no longer append root kernel command-line argument when an option
43 like "--reuse-cmdline" (default) is used, a cold reboot *without*
44 kexec maybe needed to restore kernel command-line.
45
46 NOTE: This issue is *not* specific to kexec or genkernel usage.
47 Kernel will always use last set root kernel command-line argument.
48 Any tool which might be appending root argument without a persistent
49 device name might cause a boot failure if system cannot find that
50 referenced root device during boot.
51
52 To avoid boot problems user should revise their current kernel
53 command-line (/proc/cmdline) to ensure that only *one* root kernel
54 command-line argument is set. The usage of persistent device names
55 like root=UUID=<...> is highly recommended.
56
57
58 --
59 Regards,
60 Thomas Deutschmann / Gentoo Linux Developer
61 C4DD 695F A713 8F24 2AA1 5638 5849 7EE5 1D5D 74A5

Attachments

File name MIME type
signature.asc application/pgp-signature

Replies