From: Plom Heller Date: Sat, 29 Aug 2026 23:17:10 +0000 (+0200) Subject: Add networking. X-Git-Url: https://plomlompom.com/repos/booking/%22https:/validator.w3.org/tasks?a=commitdiff_plain;h=e56b1b03b53b4c09c719a1a28b9c9e4e3412ac9d;p=confplom Add networking. --- diff --git a/install_debian.sh b/install_debian.sh index 275e26b..3898862 100755 --- a/install_debian.sh +++ b/install_debian.sh @@ -10,6 +10,7 @@ PATH_CRYPTTAB=/etc/crypttab PATH_DEV="/${NAME_DEV}" PATH_EFI=/boot/efi PATH_FSTAB=/etc/fstab +PATH_INTERFACES=/etc/network/interfaces TO_RBIND="${NAME_DEV} proc sys" # constants we might want to change at some point @@ -63,6 +64,7 @@ PATH_EFI_NAME_BOOT="${PATH_EFI}/${NAME_BOOT}" PATH_LUKS_MAPPER="${PATH_DEV}/mapper/${NAME_LUKS}" PATH_MNT_CRYPTTAB="${PATH_MNT}${PATH_CRYPTTAB}" PATH_MNT_FSTAB="${PATH_MNT}${PATH_FSTAB}" +PATH_MNT_INTERFACES="${PATH_MNT}${PATH_INTERFACES}" # sanity checks: required tools for CMD in \ @@ -154,12 +156,25 @@ printf '%s UUID=%s none luks\n' \ >| "${PATH_MNT_CRYPTTAB}" cat "${PATH_MNT_CRYPTTAB}" +# copy local networking config into target +msg 'Copying networking configuration …' +cp "${PATH_INTERFACES}" "${PATH_MNT_INTERFACES}" +chmod 600 "${PATH_MNT_INTERFACES}" + +# enable non-free-firmware component for firmware-iwlwifi below: 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}/etc/apt/sources.list" + # set up kernel, initrd msg 'Into chroot environment installing LVM tools, kernel, initrd …' chroot_sh "apt-get -qq update" chroot_sh \ "DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \ - cryptsetup cryptsetup-initramfs lvm2 linux-image-amd64" + cryptsetup cryptsetup-initramfs firmware-iwlwifi ifupdown lvm2 \ + linux-image-amd64 wpasupplicant" +msg 'Enabling networking service …' +chroot_sh "systemctl enable networking" # install kernel and initrd into EFI tree/vars msg 'EFI setup: copying kernel and initrd into %s …' "${PATH_EFI_NAME_BOOT}"