meta data for this page
  •  

This is an old revision of the document!


machine-id

Read only rootfs:

  • with tmpfs overlay on /etc
  • with preinit to bind mount persistent /mnt/state/machine-id on /etc/machine-id.
  • fist boot works well
  • after reboot systemd complains:
systemd[1]: Starting Commit a transient machine-id on disk...
systemd-machine-id-setup[611]: /etc/machine-id is not on a temporary file system.
systemd-machine-id-commit.service: Main process exited, code=exited, status=1/FAILURE
systemd-machine-id-commit.service: Failed with result 'exit-code'.
systemd[1]: Failed to start Commit a transient machine-id on disk.
### Editing /etc/systemd/system/systemd-machine-id-commit.service.d/override.conf
### Anything between here and the comment below will become the contents of the drop-in file



### Edits below this comment will be discarded


### /usr/lib/systemd/system/systemd-machine-id-commit.service
# #  SPDX-License-Identifier: LGPL-2.1-or-later
# #
# #  This file is part of systemd.
# #
# #  systemd is free software; you can redistribute it and/or modify it
# #  under the terms of the GNU Lesser General Public License as published by
# #  the Free Software Foundation; either version 2.1 of the License, or
# #  (at your option) any later version.
#
# [Unit]
# Description=Commit a transient machine-id on disk
# Documentation=man:systemd-machine-id-commit.service(8)
# DefaultDependencies=no
# Conflicts=shutdown.target
# Before=shutdown.target
# After=local-fs.target first-boot-complete.target
# ConditionPathIsReadWrite=/etc
# ConditionPathIsMountPoint=/etc/machine-id
#
# [Service]
# Type=oneshot
# RemainAfterExit=yes
# ExecStart=systemd-machine-id-setup --commit
# TimeoutSec=30s