diff --git a/scripts/functions.sh b/scripts/functions.sh index 12e18a7..8c1228a 100644 --- a/scripts/functions.sh +++ b/scripts/functions.sh @@ -240,15 +240,17 @@ function disk_create_partition() { || die "Could not create new gpt partition ($new_id) on '$device' ($id)" partprobe "$device" - # On some system, we need to wait a bit for the $new_id symlink to show up. - local new_device + # On some system, we need to wait a bit for the partition to show up. + local new_device new_device="$(resolve_device_by_id "$new_id")" \ || die "Could not resolve new device with id=$new_id" - for i in {1..10}; do - [[ -f "$new_device" ]] && break - echo "Waiting for partition $new_device to appear, $i second..." - sleep 1 - done + for i in {1..10}; do + [[ -e "$new_device" ]] && break + [[ "$i" -eq 1 ]] && printf "Waiting for partition ($new_device) to appear..." + printf " $((10 - i + 1))" + sleep 1 + [[ "$i" -eq 10 ]] && echo + done } function disk_create_raid() { diff --git a/scripts/main.sh b/scripts/main.sh index e8953a6..d0a131e 100644 --- a/scripts/main.sh +++ b/scripts/main.sh @@ -161,7 +161,7 @@ function generate_initramfs() { cat > "$(dirname "$output")/generate_initramfs.sh" < " >&2; exit 1; } dracut \\ --kver "\$kver" \\ @@ -171,7 +171,7 @@ dracut \\ --add "bash ${modules[*]}" \\ ${dracut_opts[@]@Q} \\ --force \\ - "$output" + "\$output" EOF } @@ -216,6 +216,8 @@ function install_kernel_efi() { # Create script to repeat adding efibootmgr entry cat > "/boot/efi/efibootmgr_add_entry.sh" <