Finalize and test.

This commit is contained in:
Eric Renfro 2024-07-02 16:33:00 -04:00
parent 0c48b19393
commit 8f294c4baa
Signed by: psi-jack
SSH key fingerprint: SHA256:1TKB8Z257L8EHK8GWNxKgMhD8a+FAR+f+j3nnlcuNVM

View file

@ -104,12 +104,16 @@ function prepare_target() {
${cmd} mount "$BootPart" /target/boot ${cmd} mount "$BootPart" /target/boot
fi fi
${cmd} mount -o noatime,space_cache=v2,ssd,subvol=@home "$rootmount" /target/home
for subvol in "${!SUBVOLS_DEFAULT[@]}" for subvol in "${!SUBVOLS_DEFAULT[@]}"
do do
${cmd} mount -o noatime,space_cache=v2,ssd,subvol="$subvol" "$rootmount" /target/"${SUBVOLS_DEFAULT[$subvol]}" ${cmd} mount -o noatime,space_cache=v2,ssd,subvol="$subvol" "$rootmount" /target/"${SUBVOLS_DEFAULT[$subvol]}"
done done
if [[ ! -d "/target/boot/efi" ]]; then
${cmd} mkdir -p /target/boot/efi ${cmd} mkdir -p /target/boot/efi
fi
${cmd} mount "$EFIPart" /target/boot/efi ${cmd} mount "$EFIPart" /target/boot/efi
if [[ "$SWAP" ]]; then if [[ "$SWAP" ]]; then
@ -151,7 +155,7 @@ function expert_step() {
fi fi
SwapUUID=$(grep btrfs /target/etc/fstab | head -n1 | cut -f1) SwapUUID=$(grep btrfs /target/etc/fstab | head -n1 | cut -f1)
SwapOffset=$(btrfs inspect-internal map-swapfile -r /target/swap/hibernate.swp) 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 fi
} }