From cd8d762e423014500ccba3c0a205ec92bd553354 Mon Sep 17 00:00:00 2001 From: Valeria Fadeeva Date: Wed, 18 Oct 2023 12:50:26 +0500 Subject: [PATCH] Update --- usr/bin/dracut-initramfs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/usr/bin/dracut-initramfs b/usr/bin/dracut-initramfs index a95b840..92cc70c 100755 --- a/usr/bin/dracut-initramfs +++ b/usr/bin/dracut-initramfs @@ -141,6 +141,8 @@ function gen_image() { if [ -f "/etc/kernel/cmdline" ]; then cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' "/etc/kernel/cmdline") + elif [ -f "/boot/refind_linux.conf" ]; then + cmdline=$(cat "/boot/refind_linux.conf" | head -n 1 | sed -e 's|"Boot with standard options"||g' | awk '{$1=$1;print}' | sed -e 's/"//g') else cmdline=$(sed -e 's/^[[:space:]]//g' -e 's/[[:space:]]$//g' -e 's/initrd.*$//g' "/proc/cmdline") fi @@ -153,11 +155,13 @@ function gen_image() { echo "==> Building initrd image $kernel_name $initrd_image" #dracut --force --hostonly --kver "$kernel_version" --kernel-cmdline="$cmdline" "$BOOT_PATH/initramfs-$kernel_name.img" - dracut --force --hostonly --no-hostonly-cmdline --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name.img" + #dracut --force --hostonly --no-hostonly-cmdline --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name.img" + dracut --force --hostonly --no-hostonly-i18n --early-microcode --kernel-cmdline="$cmdline" --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name.img" echo "==> Building initrd image $kernel_name $initrd_image_fallback" #dracut --force --no-hostonly --kver "$kernel_version" --kernel-cmdline="$cmdline" "$BOOT_PATH/initramfs-$kernel_name-fallback.img" - dracut --force --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name-fallback.img" + #dracut --force --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name-fallback.img" + dracut --force --no-hostonly --no-hostonly-i18n --early-microcode --kernel-cmdline="$cmdline" --kver "$kernel_version" "$BOOT_PATH/initramfs-$kernel_name-fallback.img" cp -vrf $vmlinuz $kernel_image }