Skip to content

Commit

Permalink
install: install: Add uninitialized machine-id
Browse files Browse the repository at this point in the history
We should have the file otherwise docker binds will fail

Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric authored and joaoantoniocardoso committed Sep 8, 2023
1 parent 00dc934 commit 9072eca
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions install/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit 9072eca

Please sign in to comment.