diff options
author | 2023-12-11 08:36:58 +0100 | |
---|---|---|
committer | 2023-12-11 13:39:34 +0100 | |
commit | 85eb36a4316ea1b462f0dc855a42f3bf5287b821 (patch) | |
tree | 2ab8e603b653a183d7da864237e4f0e9361d0094 /eclass | |
parent | net-im/poezio: update HOMEPAGE (diff) | |
download | gentoo-85eb36a4316ea1b462f0dc855a42f3bf5287b821.tar.gz gentoo-85eb36a4316ea1b462f0dc855a42f3bf5287b821.tar.bz2 gentoo-85eb36a4316ea1b462f0dc855a42f3bf5287b821.zip |
kernel-install.eclass: fix test phase on systemd systems
On systemd systems the dracut systemd modules are included automatically.
Systemd insists our dummy root has some valid /etc/os-release file, otherwise
it refuses the switch root operation. However, with this fix it still does not
boot up correctly on systemd systems, it gets stuck in an infinite boot loop.
Presumably the reason has something to do with our dummy root not having a real
systemd init to switch root to. We add the systemd dracut modules to the omit
list to prevent the problem and ensure the test phase behaves the same on
systemd and non-systemd systems.
Signed-off-by: Andrew Ammerlaan <andrewammerlaan@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/kernel-install.eclass | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass index b4d84f3986c0..22d8ce200016 100644 --- a/eclass/kernel-install.eclass +++ b/eclass/kernel-install.eclass @@ -231,6 +231,8 @@ kernel-install_create_qemu_image() { # some layout needed to pass dracut's usable_root() validation mkdir -p "${imageroot}"/{bin,dev,etc,lib,proc,root,sbin,sys} || die touch "${imageroot}/lib/ld-fake.so" || die + # Initrd images with systemd require some os-release file + cp "${BROOT}/etc/os-release" "${imageroot}/etc/os-release" || die kernel-install_create_init "${imageroot}/sbin/init" @@ -263,6 +265,7 @@ kernel-install_test() { plymouth # hangs, or sometimes steals output rngd # hangs or segfaults sometimes i18n # copies all the fonts from /usr/share/consolefonts + dracut-systemd systemd systemd-initrd # gets stuck in boot loop ) # NB: if you pass a path that does not exist or is not a regular |