Skip to content
Snippets Groups Projects
Commit 649fce02 authored by Jens Nolte's avatar Jens Nolte
Browse files

Use partprobe instead of sleep when waiting for a new partition table

parent cb43872a
No related branches found
No related tags found
No related merge requests found
......@@ -26,6 +26,7 @@ let
btrfs-bin = "${btrfsProgs}/bin/btrfs";
fzf-bin = "${fzf}/bin/fzf";
jq-bin = "${jq}/bin/jq";
partprobe-bin = "${busybox}/bin/partprobe";
swap = (if template ? swap then template.swap else "8G");
luks = template.luks;
......@@ -179,8 +180,8 @@ assert (typeOf swap) == "string";
''}
'' else abort "Invalid bootloader configured in template: ${template.bootloader}" }
# Partitons take a while to settle, waiting makes sure the old partitions have disappeared and new partitions are available
sleep 1s
# Ensure partition table changes have been registered by the kernel
${partprobe-bin} $block_device
print_info "Creating partitions"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment