align volatile swap partition to 1Mb instead of 512b

This commit is contained in:
xaki23 2019-07-09 23:32:27 +02:00
parent 81c64d56a2
commit ecc0b70f67
No known key found for this signature in database
GPG Key ID: C6C39B177E1A717C

View File

@ -53,7 +53,7 @@ if [ `cat /sys/class/block/$ROOT_DEV/ro` = 1 ] ; then
die "volatile.img smaller than 1GB, cannot continue" die "volatile.img smaller than 1GB, cannot continue"
fi fi
/sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF /sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
1,$SWAP_SIZE,S 2048,$SWAP_SIZE,S
,,L ,,L
EOF EOF
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -72,7 +72,7 @@ else
echo "Qubes: Doing R/W setup for TemplateVM..." echo "Qubes: Doing R/W setup for TemplateVM..."
while ! [ -e /dev/xvdc ]; do sleep 0.1; done while ! [ -e /dev/xvdc ]; do sleep 0.1; done
/sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF /sbin/sfdisk -q --unit S /dev/xvdc >/dev/null <<EOF
1,$SWAP_SIZE,S 2048,$SWAP_SIZE,S
EOF EOF
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
die "Qubes: failed to setup partitions on volatile device" die "Qubes: failed to setup partitions on volatile device"