| grep -Fxq "${NAME_BOOT}"\
&& error "an EFI boot entry named '${NAME_BOOT}' already exists"
-# run inputs by user and ask for confirmation
msg 'Your installation choices:'
msg '- target partition: [ %s ]' "${PARTITION}"
msg '- name for new boot option: [ %s ]' "${NAME_BOOT}"
debootstrap "${DEB_SUITE}" "${PATH_MNT_ROOT}"
rbind_mnt
-# set up minimal fstab
-msg 'Writing fstab …'
+msg 'Setting up fstab …'
cat <<EOF >| "${PATH_MNT_FSTAB}"
${PATH_VG_ROOT} / ext4 errors=remount-ro 0 1
${PATH_VG_DATA} /${NAME_DATA} ext4 errors=remount-ro 0 2
${PATH_VG_SWAP} none swap sw 0 0
EOF
-# set up crypttab
-msg 'Writing crypttab …'
+msg 'Setting up crypttab …'
printf '%s UUID=%s none luks\n' \
"${NAME_LUKSVG}" "$(cryptsetup luksUUID "${PARTITION}")" \
>| "${PATH_MNT_CRYPTTAB}"
-# enable non-free-firmware component for firmware-iwlwifi below (as debootstrap
-# only enables "main" by default)
+# for firmware-iwlwifi below (as debootstrap only enables "main" by default)
msg 'Enabling non-free-firmware component in target sources.list …'
sed -i 's/ main$/ main non-free-firmware/' "${PATH_MNT_APT_SOURCES}"
-# reduce installation footprint
msg 'Disabling automatic installation of APT recommends …'
printf 'APT::Install-Recommends "false";\n' >| "${PATH_MNT_APT_NORECOMMENDS}"
-# set up kernel, initrd etc.
msg 'Into chroot environment installing LVM tools, kernel, initrd etc. …'
chroot_sh "apt-get -qq update"
chroot_sh \
EOF
chmod 600 "${PATH_MNT_NM_CONN}"
-# install kernel and initrd into EFI tree/vars
msg 'EFI setup: copying kernel and initrd into %s …' "${PATH_EFI_NAME_BOOT}"
mkdir "${PATH_EFI_NAME_BOOT}"
for FILENAME in "${FNAME_INITRD}" "${FNAME_VMLINUZ}"; do
msg 'Setting up root login …'
chroot_sh "passwd"
-# clean up mounts
+# clean up
unmount_unrbind
close_luksvg
msg 'Finished!'