home · contact · privacy
Fix umount failures.
authorPlom Heller <plom@plomlompom.com>
Fri, 28 Aug 2026 12:34:40 +0000 (14:34 +0200)
committerPlom Heller <plom@plomlompom.com>
Fri, 28 Aug 2026 12:34:40 +0000 (14:34 +0200)
install_debian.sh

index 998f0d7bd12b2067852dae686790119bdf817c15..275e26b95a0067c705c8d69998b6ea95cad19a00 100755 (executable)
@@ -120,6 +120,14 @@ lvcreate -l '100%FREE' -n "${NAME_ROOT}" "${NAME_VOLGROUP}"
 msg 'Creating EXT4 filesystem …'
 mkfs.ext4 -q "${LOGVOL_ROOT}"
 
+# to facilitate later unmounting of the chrooted system: isolate our mounts
+# against propagation to services sandboxed with PrivateMounts=yes (e.g.
+# systemd-udevd), into whose private namespaces our later umount might fail to
+# reach for closing their references e.g. into what we'll want to vgchange -an,
+# which would then be blocked by referenced devices still claimed as "busy" …
+msg "Privatize script's process' mount namespace …"
+mount --make-rprivate /
+
 # mount and install base
 msg 'Mounting %s at %s …' "${LOGVOL_ROOT}" "${PATH_MNT}"
 mkdir -p "${PATH_MNT}"