summaryrefslogtreecommitdiffstats
path: root/arch-install/arch-fix-0.sh
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2023-07-21 16:04:50 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2023-07-21 16:04:50 +0200
commit42bed5b08dfc79cb76b575cd764d567fc0ad9c41 (patch)
treee9a3c4435933de759989694e1e21c24c05d7ec9e /arch-install/arch-fix-0.sh
parentc06ff8e947dcda5c115306a916b6d62b3b898695 (diff)
downloadbin-42bed5b08dfc79cb76b575cd764d567fc0ad9c41.zip
bin-42bed5b08dfc79cb76b575cd764d567fc0ad9c41.tar.gz
improve arch-install scripts
Diffstat (limited to 'arch-install/arch-fix-0.sh')
-rwxr-xr-xarch-install/arch-fix-0.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/arch-install/arch-fix-0.sh b/arch-install/arch-fix-0.sh
index 65b30bf..7ae7361 100755
--- a/arch-install/arch-fix-0.sh
+++ b/arch-install/arch-fix-0.sh
@@ -1,5 +1,7 @@
#! /bin/bash
+SWPF=/mnt/swapfile
+
modprobe efivarfs
mount -t efivarfs efivarfs /sys/firmware/efi/efivars
@@ -11,10 +13,10 @@ mount /dev/sda1 /mnt/boot
mount /dev/sda3 /mnt/home
echo "SWAPFS"
-dd if=/dev/zero of=/mnt/swapfile bs=1M count=512 || exit 1
-chmod 600 /mnt/swapfile || exit 1
-mkswap /mnt/swapfile || exit 1
-swapon /mnt/swapfile || exit 1
+dd if=/dev/zero of=$SWPF bs=1M count=1024 || exit 1
+chmod 600 $SWPF || exit 1
+mkswap $SWPF || exit 1
+swapon $SWPF || exit 1
genfstab -U -p /mnt >> /mnt/etc/fstab2