Fix fstab

This commit is contained in:
ferreo 2024-12-13 13:21:04 +01:00
parent ff94f74cd0
commit ef4fb273d2

View File

@ -47,6 +47,21 @@ mkdir -pv "$1"/usr/lib/pika/pikainstall/
cp -rvf /usr/lib/pika/pikainstall/pika-install-chroot.sh "$1"/usr/lib/pika/pikainstall/
chroot "$1" /bin/bash -c "/usr/lib/pika/pikainstall/pika-install-chroot.sh"
# Setup fstab
rm "$1"/etc/fstab
touch "$1"/etc/fstab
genfstab -U "$1"/ | grep -v zram | grep -v portal | grep -v loop | grep -v cdrom | grep -v swap > "$1"/etc/fstab
sed -i 's/subvolid=.*,//' "$1"/etc/fstab
# Setup Swaps
if [ -f /tmp/pika-installer-gtk4-swaplist ]
then
echo 'SWAP' | nc -U $SOCKET_PATH || true
for i in $(cat /tmp/pika-installer-gtk4-swaplist)
do
echo "UUID="$(blkid -s UUID -o value $i)" none swap sw 0 0" >> "$1"/etc/fstab
done
fi
echo 'UNBIND' | nc -U $SOCKET_PATH || true
# Unmount host partitions from chroot
umount "$1/media/cdrom" || umount -lf "$1/media/cdrom" || true