diff --git a/install.sh b/install.sh index d75c97f..6a76de1 100644 --- a/install.sh +++ b/install.sh @@ -91,26 +91,24 @@ echo "Creating BTRFS subvolumes." btrfs subvolume create /mnt/@ &>/dev/null btrfs subvolume create /mnt/@/.snapshots &>/dev/null mkdir /mnt/@/.snapshots/0 &>/dev/null -btrfs subvolume create /mnt/@/.snapshots/0/snapshot &>/dev/null +btrfs subvolume create /mnt/@/.snapshots/1/snapshot &>/dev/null btrfs subvolume create /mnt/@/boot &>/dev/null btrfs subvolume create /mnt/@/home &>/dev/null btrfs subvolume create /mnt/@/root &>/dev/null -btrfs subvolume create /mnt/@/var_log &>/dev/null -btrfs subvolume create /mnt/@/var_lib_gdm &>/dev/null -chattr +C /mnt/@/var_log -btrfs subvolume set-default $(btrfs subvolume list /mnt | grep "@/.snapshots/0/snapshot" | grep -oP '(?<=ID )[0-9]+') /mnt +btrfs subvolume create /mnt/@/var &>/dev/null +chattr +C /mnt/@/var +btrfs subvolume set-default $(btrfs subvolume list /mnt | grep "@/.snapshots/1/snapshot" | grep -oP '(?<=ID )[0-9]+') /mnt # Mounting the newly created subvolumes. umount /mnt echo "Mounting the newly created subvolumes." mount -o ssd,noatime,space_cache,compress=zstd:15 $BTRFS /mnt -mkdir -p /mnt/{boot,root,home,.snapshots,/var/log,/var/lib/gdm} +mkdir -p /mnt/{boot,root,home,.snapshots,/var/} mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/boot $BTRFS /mnt/boot mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/root $BTRFS /mnt/root mount -o ssd,noatime,space_cache.compress=zstd:15,subvol=@/home $BTRFS /mnt/home mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/.snapshots $BTRFS /mnt/.snapshots -mount -o ssd,noatime,space_cache,compress=zstd:15,nodatacow,subvol=@/var_log $BTRFS /mnt/var/log -mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/var_lib_gdm $BTRFS /mnt/var/lib/gdm +mount -o ssd,noatime,space_cache,compress=zstd:15,nodatacow,subvol=@/var $BTRFS /mnt/var mkdir -p /mnt/boot/efi mount $ESP /mnt/boot/efi