commit: 3fd2888a3c5803ba573d3200b9a0dd171e2d9009 Author: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> AuthorDate: Tue Jan 13 19:33:27 2026 +0000 Commit: Nowa Ammerlaan <nowa <AT> gentoo <DOT> org> CommitDate: Wed Jan 14 15:18:23 2026 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3fd2888a
kernel-build.eclass: drop ro from generic-uki cmdline, add recovery When the gpt auto generator is used the ro or rw is not used by the kernel and instead passed to the generator. It uses this to determine how to mount root. If explicitly set then the remount service on the root will not do any remounting. However if unset then the root fs is mounted ro in the initrmfs (for fsck), and then after successful mount of root the partition is remounted rw. This is really the behaviour we want as it avoids the need for manual overrides (e.g. fstab) to ensure the root partition is mounted read-write. While we are changing this, let's add an option to boot into the rescue and emergency target. Closes: https://bugs.gentoo.org/968668 Signed-off-by: Nowa Ammerlaan <nowa <AT> gentoo.org> Part-of: https://github.com/gentoo/gentoo/pull/45366 eclass/kernel-build.eclass | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass index a92151a0b8a6..993cfbae88f0 100644 --- a/eclass/kernel-build.eclass +++ b/eclass/kernel-build.eclass @@ -1,4 +1,4 @@ -# Copyright 2020-2025 Gentoo Authors +# Copyright 2020-2026 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # @ECLASS: kernel-build.eclass @@ -113,10 +113,12 @@ IUSE="+strip" # empty, then the contents are used as the first kernel cmdline # option of the multi-profile generic UKI. Supplementing the four # standard options of: -# - ro -# - ro quiet splash -# - ro lockdown=integrity -# - ro quiet splash lockdown=integrity +# - quiet +# - quiet splash +# - quiet lockdown=integrity +# - quiet splash lockdown=integrity +# - emergency +# - rescue if [[ ${KERNEL_IUSE_MODULES_SIGN} ]]; then IUSE+=" modules-sign" @@ -528,9 +530,10 @@ kernel-build_src_install() { mdraid modsign network network-manager nfs nvdimm nvmf pcsc pkcs11 plymouth qemu qemu-net resume rngd rootfs-block shutdown systemd systemd-ac-power systemd-ask-password systemd-cryptsetup - systemd-initrd systemd-integritysetup systemd-pcrphase - systemd-sysusers systemd-udevd systemd-veritysetup terminfo - tpm2-tss udev-rules uefi-lib usrmount virtiofs + systemd-emergency systemd-initrd systemd-integritysetup + systemd-pcrphase systemd-sysusers systemd-udevd + systemd-veritysetup terminfo tpm2-tss udev-rules uefi-lib + usrmount virtiofs ) local dracut_args=( @@ -578,13 +581,17 @@ kernel-build_src_install() { $'TITLE=Default with splash\nID=splash' $'TITLE=Default with lockdown\nID=lockdown' $'TITLE=Default with splash and lockdown\nID=splash-lockdown' + $'TITLE=Emergency\nID=emergency' + $'TITLE=Rescue\nID=rescue' ) cmdlines+=( - "ro" - "ro quiet splash" - "ro lockdown=integrity" - "ro quiet splash lockdown=integrity" + "quiet" + "quiet splash" + "quiet lockdown=integrity" + "quiet splash lockdown=integrity" + "emergency" + "rescue" ) local ukify_args=(
