From fc60b1a1cd09a1ad259129f702f05badeeb31ae0 Mon Sep 17 00:00:00 2001 From: simono41 Date: Mon, 16 Jul 2018 02:45:11 +0200 Subject: [PATCH] swap_fix --- arch-install | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/arch-install b/arch-install index c2626da..e362bb2 100755 --- a/arch-install +++ b/arch-install @@ -179,6 +179,12 @@ function partitioniereonepartition() { formatencrypt } +function partitioniereonepartitionmitswap() { + sgdisk -d 4 ${device} + sgdisk -a 2048 -n 4:: -c 4:"Linux filesystem" -t 4:8300 ${device} + formatencrypt +} + function usbkeyinstallation() { mkdir -p /mnt/usb-stick mount ${usbkeydevice} /mnt/usb-stick @@ -1136,7 +1142,9 @@ then echo "Partitions with UEFI" if [ "y" != "noinstall" ]; then - if [ "${skipbootpartition}" == "y" ]; then + if [ "${skipbootpartition}" == "y" ] && [ "${swap}" != "n" ]; then + partitioniereonepartitionmitswap + elif [ "${skipbootpartition}" == "y" ]; then partitioniereonepartition elif [ "${swap}" != "n" ]; then echo "Create additional swap partition" @@ -1172,7 +1180,9 @@ then elif [ "${Partition}" == "bios" ]; then echo "Partitions with MBR" if [ "y" != "noinstall" ]; then - if [ "${skipbootpartition}" == "y" ]; then + if [ "${skipbootpartition}" == "y" ] && [ "${swap}" != "n" ]; then + partitioniereonepartitionmitswap + elif [ "${skipbootpartition}" == "y" ]; then partitioniereonepartition elif [ "${swap}" != "n" ]; then echo "Create additional swap partition"