From 9072eca19fe01417fda2d6df4ef1e2a3b45d39ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patrick=20Jos=C3=A9=20Pereira?= Date: Fri, 8 Sep 2023 13:29:22 -0300 Subject: [PATCH] install: install: Add uninitialized machine-id MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We should have the file otherwise docker binds will fail Signed-off-by: Patrick José Pereira --- install/install.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/install/install.sh b/install/install.sh index 40fd3f0827..45d94b68c2 100755 --- a/install/install.sh +++ b/install/install.sh @@ -215,6 +215,12 @@ curl -fsSL $ROOT/install/network/avahi.sh | bash # Following https://systemd.io/BUILDING_IMAGES/ echo "Restarting machine-id." rm -rf /etc/machine-id /var/lib/dbus/machine-id +# The file needs to exist for docker to bind +## if /etc/machine-id does not exist, this is a first boot. During early boot, systemd will write "uninitialized\n" +## to this file and overmount a temporary file which contains the actual machine ID. +## Later (after first-boot-complete.target has been reached), the real machine ID will be written to disk. +## If /etc/machine-id contains the string "uninitialized", a boot is also considered the first boot. The same mechanism as above applies. +echo "uninitialized" > /etc/machine-id echo "Restarting random-seeds." rm -rf /var/lib/systemd/random-seed /loader/random-seed