From bcf7c9e978681991c776b8bb1c8172af83e0d606 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Tue, 27 Mar 2018 19:20:36 +0200 Subject: [PATCH] kernel-install: use up to date initramfs During installation, /usr/lib/kernel/install.d/50-dracut.install generate initramfs in $BOOT_DIR_ABS. It is important to use that one, even if there is one in /boot/initramfs-*.img already, because it was generated later and contains all required config files (including keyboard layout for entering LUKS passphrase). This fixes d1f3be0eedeac294a79f4aeb12450d73c08c55d0 "kernel-install: avoid creating initramfs multiple times". Fixes QubesOS/qubes-issues#3234 --- system-config/kernel-grub2.install | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/system-config/kernel-grub2.install b/system-config/kernel-grub2.install index 466e637..1ffa4ac 100755 --- a/system-config/kernel-grub2.install +++ b/system-config/kernel-grub2.install @@ -6,12 +6,12 @@ BOOT_DIR_ABS="$3" case "$COMMAND" in add) + # use newer image if available + if [ -e "$BOOT_DIR_ABS"/initrd ]; then + cp -u "$BOOT_DIR_ABS"/initrd "/boot/initramfs-${KVER}.img" + fi if [ ! -e "/boot/initramfs-${KVER}.img" ]; then - if [ -e "$BOOT_DIR_ABS"/initrd ]; then - cp "$BOOT_DIR_ABS"/initrd "/boot/initramfs-${KVER}.img" - else - dracut "/boot/initramfs-${KVER}.img" "$KVER" - fi + dracut "/boot/initramfs-${KVER}.img" "$KVER" fi ;; remove)