Revision 4e364304 snf-image-helper/tasks/10FixPartitionTable.in
b/snf-image-helper/tasks/10FixPartitionTable.in | ||
---|---|---|
36 | 36 |
fi |
37 | 37 |
|
38 | 38 |
if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = openbsd ]; then |
39 |
@scriptsdir@/disklabel.py -d "$(blockdev --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV" |
|
40 |
# Inform the kernel about the changes |
|
41 |
partprobe "$SNF_IMAGE_DEV" |
|
39 |
@scriptsdir@/disklabel.py -d "$($BLOCKDEV --getsz "$SNF_IMAGE_DEV")" -p "$SNF_IMAGE_DEV" |
|
40 |
# Tell the kernel to recreate the disk partitions. |
|
41 |
# We cannot use partprobe to do this because partprobe uses BLKPG ioctl |
|
42 |
# to create the partitions device files by itself one by one. Since parted |
|
43 |
# does not support disklabels, the partitions with id larger than 4 will |
|
44 |
# not be created. |
|
45 |
# We need to tell the kernel to read the partition table by itself. |
|
46 |
$BLOCKDEV --rereadpt "$SNF_IMAGE_DEV" |
|
42 | 47 |
exit 0 |
43 | 48 |
fi |
44 | 49 |
|
Also available in: Unified diff