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

installation: Wipe partition table so blkdiscard does not fail

We want blkdiscard to fail if the device is no ssd, but it will also
fail if the device already has a partition table.
parent a036ae33
No related branches found
No related tags found
No related merge requests found
......@@ -125,6 +125,12 @@ assert (typeOf swap) == "string";
exit 3
fi
print_info "Wiping partition table"
dd if=/dev/zero of=$block_device bs=1M count=1 conv=fsync
# Ensure partition table changes have been registered by the kernel
${partprobe-bin} $block_device
print_info "Discarding disk contents"
if ${blkdiscard-bin} $block_device
then
......
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