Open datafoo opened 4 years ago
@datafoo most of these are probably caused by After=
(or Wants=
) referring to unit files not installed.
Having After=
referring to a non-existent unit file is probably fine, just a bit ugly.
Can you grep which unit files refer the mentioned unites, and add this info to the list?
That should make things a bit easier to dive into.
I have update the list with the results from these commands:
systemctl list-dependencies --reverse tmp.mount
systemctl list-dependencies --reverse auditd.service
systemctl list-dependencies --reverse display-manager.service
systemctl list-dependencies --reverse dracut-mount.service
systemctl list-dependencies --reverse nfs-kernel-server.service
systemctl list-dependencies --reverse nfs-server.service
systemctl list-dependencies --reverse plymouth-quit-wait.service
systemctl list-dependencies --reverse plymouth-start.service
systemctl list-dependencies --reverse rpc-statd-notify.service
systemctl list-dependencies --reverse smb.service
systemctl list-dependencies --reverse syslog.service
systemctl list-dependencies --reverse systemd-hwdb-update.service
systemctl list-dependencies --reverse systemd-quotacheck.service
systemctl list-dependencies --reverse systemd-sysusers.service
systemctl list-dependencies --reverse cryptsetup.target
systemctl list-dependencies --reverse initrd-switch-root.target
systemctl list-dependencies --reverse time-set.target
systemctl list-dependencies --before tmp.mount
systemctl list-dependencies --before auditd.service
systemctl list-dependencies --before display-manager.service
systemctl list-dependencies --before dracut-mount.service
systemctl list-dependencies --before nfs-kernel-server.service
systemctl list-dependencies --before nfs-server.service
systemctl list-dependencies --before plymouth-quit-wait.service
systemctl list-dependencies --before plymouth-start.service
systemctl list-dependencies --before rpc-statd-notify.service
systemctl list-dependencies --before smb.service
systemctl list-dependencies --before syslog.service
systemctl list-dependencies --before systemd-hwdb-update.service
systemctl list-dependencies --before systemd-quotacheck.service
systemctl list-dependencies --before systemd-sysusers.service
systemctl list-dependencies --before cryptsetup.target
systemctl list-dependencies --before initrd-switch-root.target
systemctl list-dependencies --before time-set.target
systemctl list-dependencies --after tmp.mount
systemctl list-dependencies --after auditd.service
systemctl list-dependencies --after display-manager.service
systemctl list-dependencies --after dracut-mount.service
systemctl list-dependencies --after nfs-kernel-server.service
systemctl list-dependencies --after nfs-server.service
systemctl list-dependencies --after plymouth-quit-wait.service
systemctl list-dependencies --after plymouth-start.service
systemctl list-dependencies --after rpc-statd-notify.service
systemctl list-dependencies --after smb.service
systemctl list-dependencies --after syslog.service
systemctl list-dependencies --after systemd-hwdb-update.service
systemctl list-dependencies --after systemd-quotacheck.service
systemctl list-dependencies --after systemd-sysusers.service
systemctl list-dependencies --after cryptsetup.target
systemctl list-dependencies --after initrd-switch-root.target
systemctl list-dependencies --after time-set.target
As written in https://github.com/NixOS/nixpkgs/issues/90188, some of these missing units seem to be already caused by upstream units - you might want to check the systemd/systemd
issue tracker regarding those, and whether these should be considered an error.
The tmp.mount
one is a good example of such a thing.
These occurences might also be configuration-specific - we currently build systemd without cryptsetup (work ongoing in https://github.com/NixOS/nixpkgs/pull/66856), but systemd-ask-password-console.path
and systemd-ask-password-wall.path
unconditionally refer to cryptsetup.target
. This should be rendered by meson, and made conditional on whether systemd is built with cryptsetup support or not.
Happy to fix these warnings where we cause them (as we did in https://github.com/NixOS/nixpkgs/pull/87742), but we shouldn't try to patch around systemd downstream if it's caused upstream.
Happy to fix these warnings where we cause them (as we did in #87742), but we shouldn't try to patch around systemd downstream if it's caused upstream.
That makes sense.
So, from my understanding, only the followings are not from the native systemd
:
display-manager.service
, referred to by systemd-vconsole-setup.service
dracut-mount.service
, referred to by zfs-import.target
nfs-kernel-server.service
, referred to by zfs-share.service
nfs-server.service
, referred to by zfs-share.service
rpc-statd-notify.service
, referred to by zfs-share.service
smb.service
, referred to by zfs-share.service
I marked this as stale due to inactivity. → More info
@datafoo The whole zfs-* dependencies seem to be coming from the zfs package itself - I'd encourage opening bug reports there, or re-creating these units in nixos/modules/tasks/filesystems/zfs.nix
, and having them conditionally on the corresponding services to be enabled.
I just opened https://github.com/NixOS/nixpkgs/pull/106787, which fixes the other occurence.
I marked this as stale due to inactivity. → More info
(I first posted this same issue on the NixOS Discourse.)
I'm having a similar problem -- specifically, the error, "Unit window-manager.service not found", which is preventing me from using the graphical desktop environment (in my case, KDE).
I installed NixOS 22.05 on a new machine using the latest (as of Friday, 2022-11-04) Plasma .iso. Plasma didn't load in the installer, so I installed from the command line. When I boot, Plasma still doesn't load.
Apeing some instructions in the NixOS manual, I log into this bare-shell system and attempt to start KDE manually. I have the following interaction:
[jeff@gobbledygook]$ systemctl start display-manager
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authenticating as: jeff # I typed this in
Password: # I typed this in, too, though you can't see it
==== AUTHENTICATION COMPLETE ====
[jeff@gobbledygook]$ systemctl start window-manager
==== AUTHENTICATING FOR org.freedesktop.systemd1.manage-units ====
Authenticating as: jeff # I typed this in
Password: # I typed this in, too, though you can't see it
==== AUTHENTICATION COMPLETE ====
Failed to start window-manager.service: Unit window-manager.service not found.
My configuration on this system is extremely basic. (I always start new systems that way.) I haven't run any channel-related commands except sudo nix-channel --list
, which reports that I'm on nixos-22.05
.
Describe the bug Many systemd units are not-found after a fresh install.
To Reproduce
systemctl list-units --state not-found
Expected behavior A fresh and clean install should not have not-found units.
Additional context
In my case (no graphical user interface), here is what I see:
proc-sys-fs-binfmt_misc.automount
: dedicated issue #87687, fixed in #87742proc-sys-fs-binfmt_misc.mount
: dedicated issue #87687, fixed in #87742tmp.mount
, referred to bybasic.target
, dedicated issue #90188, no fixauditd.service
, referred to bysystemd-update-utmp.service
display-manager.service
, referred to bysystemd-vconsole-setup.service
dracut-mount.service
, referred to byzfs-import.target
nfs-kernel-server.service
, referred to byzfs-share.service
nfs-server.service
, referred to byzfs-share.service
plymouth-quit-wait.service
, referred to bygetty@tty1.service
plymouth-start.service
, referred to byrescue.service
,systemd-ask-password-console.path
andsystemd-ask-password-console.service
rpc-statd-notify.service
, referred to byzfs-share.service
smb.service
, referred to byzfs-share.service
syslog.service
, referred to bysyslog.socket
systemd-hwdb-update.service
, referred to bysystemd-udevd.service
systemd-quotacheck.service
, referred to bysystemd-fsck@dev-disk-by\x2duuid-A147\x2d9B2D.service
systemd-sysusers.service
, referred to bysystemd-timesyncd.service
,systemd-tmpfiles-setup-dev.service
,systemd-tmpfiles-setup.service
andsystemd-udevd.service
cryptsetup.target
, referred to bysystemd-ask-password-console.path
andsystemd-ask-password-wall.path
initrd-switch-root.target
, referred to bysystemd-vconsole-setup.service
time-set.target
, referred to bysystemd-timesyncd.service
,time-sync.target
andsystemd-tmpfiles-clean.service
Metadata Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.