Finalize and test.
This commit is contained in:
parent
0c48b19393
commit
8f294c4baa
1 changed files with 6 additions and 2 deletions
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue