From adb32cec27f06799f6c029bfde6bd76da087d49c Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Tue, 2 Jul 2024 16:48:15 -0400 Subject: [PATCH] Update grub, and umount it all. --- linuxmint-postsetup.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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() {