From: Plom Heller Date: Wed, 26 Aug 2026 07:30:47 +0000 (+0200) Subject: Add minimal fstab so we boot into a readwrite root rather than a readonly. X-Git-Url: https://plomlompom.com/repos/%22https:/validator.w3.org/static/todo?a=commitdiff_plain;h=173e1ea462c22f435d991bfa4bf69c40825aa1b3;p=confplom Add minimal fstab so we boot into a readwrite root rather than a readonly. --- diff --git a/install_debian.sh b/install_debian.sh index ed100b4..35a86cf 100755 --- a/install_debian.sh +++ b/install_debian.sh @@ -4,8 +4,8 @@ SCRIPT_NAME=$0 # constants unlikely to change PATH_DEV=/dev -NAME_ROOT=root PATH_EFI=/boot/efi +PATH_FSTAB=/etc/fstab NAME_INITRD=initrd.img NAME_VMLINUZ=vmlinuz @@ -14,6 +14,7 @@ DEB_SUITE=trixie PATH_BOOT_DEVICE="${PATH_DEV}/nvme0n1" IDX_BOOT_PARTITION=1 PATH_MNT=/mnt/debinst +NAME_ROOT=root # helpers msg_nonl() { @@ -56,6 +57,7 @@ BOOT_LABEL=$3 LOGVOL_ROOT="${PATH_DEV}/${NAME_VOLGROUP}/${NAME_ROOT}" PATH_EFI_BOOT_LABEL="${PATH_EFI}/${BOOT_LABEL}" DEV_SLAVE="${PATH_MNT}${PATH_DEV}" +PATH_MNT_FSTAB="${PATH_MNT}${PATH_FSTAB}" # sanity checks: required tools for CMD in debootstrap efibootmgr lvcreate pvcreate vgcreate vgs; do @@ -112,6 +114,11 @@ msg 'For chroot environment also mounting %s into there …' "${PATH_DEV}" mount --rbind "${PATH_DEV}" "${DEV_SLAVE}" mount --make-rslave "${DEV_SLAVE}" +# set up minimal fstab +msg 'Writing fstab …' +printf '%s / ext4 errors=remount-ro 0 1\n' "${LOGVOL_ROOT}"\ + >| "${PATH_MNT_FSTAB}" + # set up kernel, initrd msg 'Into chroot environment installing LVM tools, kernel, initrd …' chroot_sh "apt -qq update"