Skip to content

Commit

Permalink
factory: make classic-mounts.service active after finishing
Browse files Browse the repository at this point in the history
Add RemainAfterExit=yes to classic-mounts.service unit to make sure it
is considered active by systemd. Otherwise, it was started twice in
the initramfs, and in the second run there was a race condition with
initrd-udevadm-cleanup-db.service, where if daemon-reload happened
after cleaning the udev database, systemd considered some device units
unplugged, including disks, which in turn led to unmounts in /run/mnt.
In turn this was causing that /lib/{modules,firmware} was not being
mounted after switch root.
  • Loading branch information
alfonsosanchezbeato committed Aug 29, 2024
1 parent b0460f5 commit 2cefcb7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions factory/usr/lib/systemd/system/classic-mounts.service
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Before=initrd-fs.target

[Service]
Type=oneshot
RemainAfterExit=yes
# We force re-running kernel-snap-generator
ExecStart=systemctl daemon-reload
StandardError=journal+console

0 comments on commit 2cefcb7

Please sign in to comment.