CentOS luks image -> replace sfdisk by parted
This commit is contained in:
parent
a9d79928a3
commit
310ab5fd7a
1 changed files with 4 additions and 6 deletions
|
@ -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"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue