diff --git a/linuxmint-postsetup.sh b/linuxmint-postsetup.sh index 16a9a97..2f5202b 100755 --- a/linuxmint-postsetup.sh +++ b/linuxmint-postsetup.sh @@ -123,6 +123,23 @@ function prepare_target() { ${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /target/swap ${cmd} btrfs filesystem mkswapfile --size "$(get_hibernate_size)g" --uuid clear /target/swap/hibernate.swp fi + + if [[ "$SWAP" || "$BootPart" == "@boot" ]]; then + ${cmd} arch-chroot /target update-grub2 + fi + + for subvol in "${!SUBVOLS_DEFAULT[@]}" + do + ${cmd} umount /target/"${SUBVOLS_DEFAULT[$subvol]}" + done + + if [[ "$SWAP" ]]; then + ${cmd} umount /target/swap + fi + + ${cmd} umount /target/boot/efi + ${cmd} umount /target/boot + ${cmd} umount /target } function expert_step() {