diff --git a/install.sh b/install.sh index 97799f1..7887add 100644 --- a/install.sh +++ b/install.sh @@ -88,21 +88,24 @@ mount $BTRFS /mnt # Creating BTRFS subvolumes. echo "Creating BTRFS subvolumes." -btrfs su cr /mnt/@ &>/dev/null -btrfs su cr /mnt/@boot &>/dev/null -btrfs su cr /mnt/@home &>/dev/null -btrfs su cr /mnt/@snapshots &>/dev/null -btrfs su cr /mnt/@var_log &>/dev/null +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/@/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 # Mounting the newly created subvolumes. umount /mnt echo "Mounting the newly created subvolumes." mount -o ssd,noatime,space_cache,compress=zstd,subvol=@ $BTRFS /mnt mkdir -p /mnt/{home,.snapshots,/var/log,boot} -mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@boot $BTRFS /mnt/boot -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,nodatacow,subvol=@var_log $BTRFS /mnt/var/log +mount -o ssd,noatime,space_cache,compress=zstd:15,subvol=@/boot $BTRFS /mnt/boot +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,nodatacow,subvol=@/var_log $BTRFS /mnt/var/log chattr +C /mnt/var/log mkdir /mnt/boot/efi mount $ESP /mnt/boot/efi