#1114953 systemd: fails to upgrade in chroot without /proc

Package:
systemd
Source:
systemd
Description:
system and service manager
Submitter:
Christoph Anton Mitterer
Date:
2025-09-21 10:11:05 UTC
Severity:
normal
Tags:
#1114953#5
Date:
2025-09-12 03:11:27 UTC
From:
To:
Hey.

Not sure if this is simply no longer supported, but upgrading
systemd now fails in a chroot, when /proc isn't bind mounted
into that:
Setting up systemd (258~rc4-1) ...
Cannot open '/etc/machine-id' in neither writable nor read-only mode: Function not implemented
dpkg: error processing package systemd (--configure):
 installed systemd package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of udev:
 udev depends on systemd | systemd-standalone-sysusers | systemd-sysusers; however:
  Package systemd is not configured yet.
  Package systemd-standalone-sysusers is not installed.
  Package systemd-sysusers is not installed.
  Package systemd which provides systemd-sysusers is not configured yet.
...


To the least the error is a bit misleading, as it even fails with the same,
if the file is set u+w.

Cheers,
Chris.

#1114953#10
Date:
2025-09-21 10:08:44 UTC
From:
To:
Hi,

I'm hitting this in a sbuild chroot with systemd 258-1

in systemd postinstall script at line 68 there is a call
to systemd-machine-id-setup that is not guarded:

if the problem is that systemd-machine-id-setup does not work
if proc is not mounted (not sure about that) maybe

if mountpoint -q ${DPKG_ROOT:+--root="$DPKG_ROOT"}/proc ; then
	systemd-machine-id-setup ${DPKG_ROOT:+--root="$DPKG_ROOT"}
fi

Cheers,
Lorenzo