From dae3d7ade3c2df56eeddf1230121faaccb1f4d6f Mon Sep 17 00:00:00 2001 From: Plom Heller Date: Fri, 11 Sep 2026 08:55:48 +0200 Subject: [PATCH] Facilitate hibernation. --- setup_scripts/install_debian.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup_scripts/install_debian.sh b/setup_scripts/install_debian.sh index e1fa41a..074ff87 100755 --- a/setup_scripts/install_debian.sh +++ b/setup_scripts/install_debian.sh @@ -46,6 +46,7 @@ PATH_HOSTNAME=/etc/hostname PATH_HOSTS=/etc/hosts PATH_INTERFACES=/etc/network/interfaces PATH_NM_CONNECTIONS=/etc/NetworkManager/system-connections +PATH_RESUME_CONF=/etc/initramfs-tools/conf.d/resume # constants we might want to change at some point DEB_SUITE=trixie @@ -68,13 +69,12 @@ PATH_MNT_HOSTS="${PATH_MNT_CHROOT}${PATH_HOSTS}" PATH_MNT_NM_CONN="${PATH_MNT_CHROOT}${PATH_NM_CONNECTIONS}/${FNAME_NM_CONN}" PATH_MNT_NM_CONNECTIONS="${PATH_MNT_CHROOT}${PATH_NM_CONNECTIONS}" PATH_MNT_PROFILE="${PATH_MNT_CHROOT}${PATH_HOME_ROOT}/${FNAME_PROFILE}" +PATH_MNT_RESUME_CONF="${PATH_MNT_CHROOT}${PATH_RESUME_CONF}" PATH_VG=$(path_vg "${NAME_LUKSVG}") # shellcheck disable=SC2034 # (used only inside templates/fstab, rendered via render_template) PATH_VG_DATA=${PATH_VG}/${NAME_DATA} PATH_VG_ROOT=${PATH_VG}/${NAME_ROOT} -# shellcheck disable=SC2034 -# (used only inside templates/fstab, rendered via render_template) PATH_VG_SWAP=${PATH_VG}/${NAME_SWAP} # sanity checks @@ -132,6 +132,10 @@ sed -i 's/ main$/ main non-free-firmware/' "${PATH_MNT_APT_SOURCES}" disable_apt_recommends "${PATH_MNT_CHROOT}" +msg 'Setting up hibernation resume-from-swap config …' +mkdir -p "$(dirname "${PATH_MNT_RESUME_CONF}")" +printf 'RESUME=%s\n' "${PATH_VG_SWAP}" >| "${PATH_MNT_RESUME_CONF}" + msg 'Into chroot environment installing LVM tools, kernel, initrd etc. …' chroot_sh "apt-get -qq update" chroot_sh \ -- 2.30.2