I am using NixOS 24.05 (20240925.759537f) x86_64 and I have had relatively few issues until now. My system is installed onto a btrfs partition with separate partitions for /boot and swap (for hibernation). The btrfs config is essentially the same as is described in the btrfs page on the NixOS wiki.
Recently, (possibly following a flake update), all my NixOS rebuilds have started failing to switch at the end of the rebuild, citing that systemd.update-utmp.service
failed to start. The system still builds, and the new build can be selected at boot, but the same service fails to start. The strange part is that rolling back to previous NixOS generations does not solve the issue, and running systemctl status systemd-update-utmp.service
still shows the same error despite rolling back. Running a btrfs check to check the health of the filesystem returns no errors. The following is the output from running systemctl status systemd-update-utmp.service
, which is identical to the output appended to the end of a NixOS rebuild where it fails to switch to the newly built system.
systemctl status systemd-update-utmp.service
× systemd-update-utmp.service - Record System Boot/Shutdown in UTMP
Loaded: loaded (/etc/systemd/system/systemd-update-utmp.service; enabled; preset: enabled)
Drop-In: /nix/store/8j3k9hm9x6g94v21z0lmd66k4xfbrp34-system-units/systemd-update-utmp.service.d
└─overrides.conf
Active: failed (Result: exit-code) since Thu 2024-09-26 15:08:33 CDT; 10min ago
Docs: man:systemd-update-utmp.service(8)
man:utmp(5)
Process: 13543 ExecStart=/nix/store/nswmyag3qi9ars0mxw5lp8zm0wv5zxld-systemd-255.9/lib/systemd/systemd-update-utmp reboot (code=exited, status=1/FAILURE)
Main PID: 13543 (code=exited, status=1/FAILURE)
IP: 0B in, 0B out
CPU: 13ms
Sep 26 15:08:33 Apollo systemd[1]: Starting Record System Boot/Shutdown in UTMP...
Sep 26 15:08:33 Apollo systemd-update-utmp[13543]: Failed to write utmp record: Input/output error
Sep 26 15:08:33 Apollo systemd[1]: systemd-update-utmp.service: Main process exited, code=exited, status=1/FAILURE
Sep 26 15:08:33 Apollo systemd[1]: systemd-update-utmp.service: Failed with result 'exit-code'.
Sep 26 15:08:33 Apollo systemd[1]: Failed to start Record System Boot/Shutdown in UTMP.