CentOS luks image -> replace sfdisk by parted

This commit is contained in:
fnux 2020-07-06 09:35:47 +02:00
parent a9d79928a3
commit 310ab5fd7a

View file

@ -61,12 +61,10 @@ losetup "$LOOPBACK_DEVICE" "$IMAGE_PATH"
trap cleanup EXIT trap cleanup EXIT
# Create partition table, format partitions. # Create partition table, format partitions.
{ parted --script "$LOOPBACK_DEVICE" \
sfdisk --no-reread "$LOOPBACK_DEVICE" <<EOF mklabel msdos \
1M,500M,L,* mkpart primary ext4 1M 500M \
,,L mkpart primary ext4 500M 100%
EOF
} || true
partprobe "$LOOPBACK_DEVICE" partprobe "$LOOPBACK_DEVICE"