From 2c7c804105093d0d4ffe9683094d27a9e7986631 Mon Sep 17 00:00:00 2001 From: oddlama Date: Sat, 25 Apr 2020 20:17:24 +0200 Subject: [PATCH] Fixed missing uuid resolve in dracut cmdline generation --- scripts/internal_config.sh | 8 +++++--- scripts/main.sh | 2 +- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/internal_config.sh b/scripts/internal_config.sh index 5b0c419..28e5412 100644 --- a/scripts/internal_config.sh +++ b/scripts/internal_config.sh @@ -158,8 +158,9 @@ create_raid() { verify_existing_unique_ids ids local new_id="${arguments[new_id]}" - create_resolve_entry "$new_id" mdadm "${DISK_ID_TO_UUID[$new_id]}" - DISK_DRACUT_CMDLINE+=("rd.md.uuid=$(uuid_to_mduuid "$new_id")") + local uuid="${DISK_ID_TO_UUID[$new_id]}" + create_resolve_entry "$new_id" mdadm "$uuid" + DISK_DRACUT_CMDLINE+=("rd.md.uuid=$(uuid_to_mduuid "$uuid")") DISK_ACTIONS+=("action=create_raid" "$@" ";") } @@ -179,8 +180,9 @@ create_luks() { local id="${arguments[id]}" local new_id="${arguments[new_id]}" local name="${arguments[name]}" + local uuid="${DISK_ID_TO_UUID[$new_id]}" create_resolve_entry "$new_id" luks "$name" - DISK_DRACUT_CMDLINE+=("rd.luks.uuid=$id") + DISK_DRACUT_CMDLINE+=("rd.luks.uuid=$uuid") DISK_ACTIONS+=("action=create_luks" "$@" ";") } diff --git a/scripts/main.sh b/scripts/main.sh index f8c43c3..da3c295 100755 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -198,7 +198,7 @@ install_kernel_bios() { try syslinux --directory syslinux --install "$biosdev" # Create syslinux.cfg - echo -n "$(generate_syslinux_cfg)" > /boot/bios/syslinux/syslinux.cfg \ + echo "$(generate_syslinux_cfg)" > /boot/bios/syslinux/syslinux.cfg \ || die "Could save generated syslinux.cfg" # Install syslinux MBR record