From 6e1be91961967a6485901ac431f6f6b06675b750 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 22 Dec 2022 10:41:41 +0100 Subject: archiso/mkarchiso: write "uninitialized" to /etc/machine-id This is a new value introduced in systemd v247. It makes sure a new machine-id is generated, but is handled as first boot as well. See "First Boot Semantics" in machine-id(5) for details. --- archiso/mkarchiso | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'archiso') diff --git a/archiso/mkarchiso b/archiso/mkarchiso index 8449f51..7331bb0 100755 --- a/archiso/mkarchiso +++ b/archiso/mkarchiso @@ -163,9 +163,10 @@ _cleanup_pacstrap_dir() { [[ -d "${pacstrap_dir}/var/tmp" ]] && find "${pacstrap_dir}/var/tmp" -mindepth 1 -delete # Delete package pacman related files. find "${work_dir}" \( -name '*.pacnew' -o -name '*.pacsave' -o -name '*.pacorig' \) -delete - # Create an empty /etc/machine-id + # Create /etc/machine-id with special value 'uninitialized': the final id is + # generated on first boot, systemd's first-boot mechanism applies (see machine-id(5)) rm -f -- "${pacstrap_dir}/etc/machine-id" - printf '' > "${pacstrap_dir}/etc/machine-id" + printf 'uninitialized\n' > "${pacstrap_dir}/etc/machine-id" _msg_info "Done!" } -- cgit v1.2.3-70-g09d2