Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if /etc/machine-id does not exist and we're not still in initramfs then
- systemd will enter "first boot" mode.
- in this case /etc may not be mounted read-only or boot will fail.
- first boot mode is not triggered if /etc/machine-id exists but is empty/invalid.
- new in v247: if /etc/machine-id exists but contains the string "uninitialized"
- then it is treated as if it were missing and first boot mode is entered.
- --- obtaining machine id ---
- systemd checks the following, in decreasing order of priority:
- systemd cmdline option '--machine-id'
- kernel parameter 'systemd.machine_id'
- file '/etc/machine-id'
- file '/var/lib/dbus/machine-id' (unless this is a symlink)
- env variable 'container_uuid' if running in a container
- file '/sys/class/dmi/id/product_uuid' if running in a KVM container
- file '/sys/firmware/devicetree/base/vm,uuid' if running in a KVM container
- until it finds a _valid_ uuid.
- if none is found, a new random uuid is generated.
- --- writing machine id ---
- systemd will try to save the machine id to /etc/machine-id, unless it was
- obtained from there. if this fails then systemd will save it to /run/machine-id
- instead and it then bind-mounts this on top of /etc/machine-id. this is called
- a "transient machine id" since it was not saved to persistent storage.
- new in v247: in first boot mode the string "uninitialized" will be written to
- /etc/machine-id and a transient machine id will be used until boot is complete
- at which point systemd-machine-id-commit.service will make the machine id
- presistent. this ensures that if the first boot does not complete (e.g. power failure)
- then first boot mode will be entered again on the next boot.
- ---- first boot mode ---
- /run/systemd/first-boot will be created (as empty file).
- it will be unlinked again when the (first) boot is finished.
- ConditionFirstBoot for unit files will evaluate to true.
- new in v246: this can be overridden using kernel parameter 'systemd.condition-first-boot'.
- systemd will perform the equivalent of:
- systemctl --system --preset-mode=enable-only preset-all
- When seeding the kernel entropy pool from the seed file '/usr/lib/systemd/random-seed', the
- 'user.random-seed-creditable' xattr on the seed file will be ignored hence the entropy pool
- will only be credited if SYSTEMD_RANDOM_SEED_CREDIT=forced.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement