Update grub, and umount it all.

This commit is contained in:
Eric Renfro 2024-07-02 16:48:15 -04:00
parent ae1889f32f
commit adb32cec27
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -123,6 +123,23 @@ function prepare_target() {
${cmd} mount -o noatime,ssd,subvol=@swap "$rootmount" /target/swap ${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 ${cmd} btrfs filesystem mkswapfile --size "$(get_hibernate_size)g" --uuid clear /target/swap/hibernate.swp
fi 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() { function expert_step() {