initramfs: fix swap size

It should be 1GB, not 1MB...

QubesOS/qubes-issues#1354
This commit is contained in:
Marek Marczykowski-Górecki 2015-11-13 14:42:51 +01:00
parent 170d46c40d
commit 8311e1263d
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ if [ `cat /sys/block/xvda/ro` = 1 ] ; then
while ! [ -e /dev/xvdc ]; do sleep 0.1; done
VOLATILE_SIZE=$(sfdisk -s /dev/xvdc)
ROOT_SIZE=$(sfdisk -s /dev/xvda) # kbytes
SWAP_SIZE=1024 # kbytes
SWAP_SIZE=$(( 1024 * 1024 )) # kbytes
if [ $VOLATILE_SIZE -lt $(($ROOT_SIZE + $SWAP_SIZE)) ]; then
ROOT_SIZE=$(($VOLATILE_SIZE - $SWAP_SIZE))
fi

View File

@ -21,7 +21,7 @@ if [ `cat /sys/block/xvda/ro` = 1 ] ; then
while ! [ -e /dev/xvdc ]; do sleep 0.1; done
VOLATILE_SIZE=$(sfdisk -s /dev/xvdc)
ROOT_SIZE=$(sfdisk -s /dev/xvda) # kbytes
SWAP_SIZE=1024 # kbytes
SWAP_SIZE=$(( 1024 * 1024 )) # kbytes
if [ $VOLATILE_SIZE -lt $(($ROOT_SIZE + $SWAP_SIZE)) ]; then
ROOT_SIZE=$(($VOLATILE_SIZE - $SWAP_SIZE))
fi