Commit 4e364304 authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Use blockdev instead of partprobe after disklabel

partprobe creates the partitions by itself and since it does not
support disklabels, the disklabel partitons are not recreated
parent 48af2403
......@@ -36,9 +36,14 @@ if [ ! -b "$SNF_IMAGE_DEV" ]; then
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then
@scriptsdir@/ -d "$(blockdev --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV"
# Inform the kernel about the changes
partprobe "$SNF_IMAGE_DEV"
@scriptsdir@/ -d "$($BLOCKDEV --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV"
# Tell the kernel to recreate the disk partitions.
# We cannot use partprobe to do this because partprobe uses BLKPG ioctl
# to create the partitions device files by itself one by one. Since parted
# does not support disklabels, the partitions with id larger than 4 will
# not be created.
# We need to tell the kernel to read the partition table by itself.
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment