From de79317fb3b313c1b999a454a6b7b2fdc0fe5b82 Mon Sep 17 00:00:00 2001 From: Tobias Strobel Date: Sun, 25 Sep 2022 17:59:53 +0200 Subject: [PATCH] Fix new install.sh --- install.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 5cd9e46..340f9bd 100644 --- a/install.sh +++ b/install.sh @@ -20,7 +20,7 @@ # - Run: `# bash <(curl -sL https://link.rafe.li/dot)` # -set -xeuo pipefail +set -uo pipefail trap 's=$?; echo "$0: Error on line "$LINENO": $BASH_COMMAND"; exit $s' ERR exec 1> >(tee "/root/stdout.log") @@ -135,6 +135,10 @@ mount -t btrfs -o subvol=@tmp,$o_btrfs LABEL=system /mnt/var/tmp # Mount additional partitions mount -o $o LABEL=EFI /mnt/efi +# Change default btrfs sub-volume (for DPS) +default_subvolume=$(btrfs subvolume list /mnt | grep "path @$" | cut -d ' ' -f2) +btrfs subvolume set-default ${default_subvolume} /mnt + # Disable CoW for /home due to large loopback files by systemd-homed chattr +C /mnt/home @@ -187,6 +191,6 @@ systemctl --root /mnt enable systemd-resolved systemctl --root /mnt enable systemd-homed # Set root password -echo -n "password" | passwd -R /mnt root +echo "root:password" | chpasswd -R /mnt echo "BOOTSTRAPPING FINISHED"