From 8f294c4baa6cc823850e93cdfccc3d94f14dddeb Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Tue, 2 Jul 2024 16:33:00 -0400 Subject: [PATCH] Finalize and test. --- linuxmint-postsetup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/linuxmint-postsetup.sh b/linuxmint-postsetup.sh index 95d25ed..b56cf47 100755 --- a/linuxmint-postsetup.sh +++ b/linuxmint-postsetup.sh @@ -104,12 +104,16 @@ function prepare_target() { ${cmd} mount "$BootPart" /target/boot fi + ${cmd} mount -o noatime,space_cache=v2,ssd,subvol=@home "$rootmount" /target/home + for subvol in "${!SUBVOLS_DEFAULT[@]}" do ${cmd} mount -o noatime,space_cache=v2,ssd,subvol="$subvol" "$rootmount" /target/"${SUBVOLS_DEFAULT[$subvol]}" done - ${cmd} mkdir -p /target/boot/efi + if [[ ! -d "/target/boot/efi" ]]; then + ${cmd} mkdir -p /target/boot/efi + fi ${cmd} mount "$EFIPart" /target/boot/efi if [[ "$SWAP" ]]; then @@ -151,7 +155,7 @@ function expert_step() { fi SwapUUID=$(grep btrfs /target/etc/fstab | head -n1 | cut -f1) SwapOffset=$(btrfs inspect-internal map-swapfile -r /target/swap/hibernate.swp) - ${cmd} sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/\(\"[^\"]*\)$/ resume=${SwapUUID} resume_offset=${SwapOffset}&/" /target/etc/default/grub.d/50_lmde.cfg + ${cmd} sed -i "/^GRUB_CMDLINE_LINUX_DEFAULT=/ s/\(\"[^\"]*\)$/ resume=${SwapUUID} resume_offset=${SwapOffset}&/" /target/etc/default/grub fi }