After creating a vanilla gce nixos image and booting it, I copy over /etc/nixos/connfiguration.nix and run nixos-rebuild. My server is running nixos-14.04 (not unstable), if that matters.
After building all the required paths, I get this output:
updating GRUB 2 menu...
stopping the following units: -.mount, firewall.service, local-fs.target, network-interfaces.target, nix-daemon.service, nix-daemon.socket, nscd.service, remote-fs.target, systemd-modules-load.service
Failed to stop -.mount: Operation refused, unit -.mount may be requested by dependency only.
activating the configuration...
setting up /etc...
restarting the following units: sshd.service
starting the following units: -.mount, default.target, getty.target, ip-up.target, local-fs.target, multi-user.target, network-interfaces.target, network-online.target, network.target, nix-daemon.socket, nscd.service, paths.target, remote-fs.target, slices.target, sockets.target, swap.target, systemd-modules-load.service, timers.target
Failed to start -.mount: Operation refused, unit -.mount may be requested by dependency only.
the following new units were started: alsa-store.service, [email protected], [email protected], system-getty.slice, system-serial\x2dgetty.slice
I'm not entirely sure _why_ the mount settings for "/" have changed. There's only one disk attached, and when I reboot, it's still mounted on "/" just fine. And after rebooting, this error doesn't happen again. So it's not a big deal, but the error should probably be suppressed somehow.
@Phreedom
This issue sounds stale. I assume the problems have disappeared somewhere between 14.04 and 15.09. Reopen otherwise, please.
@vcunat: This could probably be fixed by 26963cfc2dfd8ba6bce927535317d799dda15102, but haven't tested it yet.
After a nixos-rebuild switch
:
created 14795 symlinks in user environment
gtk-update-icon-cache: Cache file created successfully.
gtk-update-icon-cache: Cache file created successfully.
building '/nix/store/l818nc28zgh2cl35wjj6dqiip3wq1007-dbus-1.drv'...
building '/nix/store/7jqjdsgk21q9jffp397xvkygr2fq91x7-set-environment.drv'...
building '/nix/store/nibg8833dsm71y792aqvklrgc6lr5v7a-unit-polkit.service.drv'...
building '/nix/store/7jdlb1pv28f6jhnnnn8fiznvffvj7mbc-unit-systemd-fsck-.service.drv'...
building '/nix/store/79pxhqgjgzi900k42dw3k3zq91v539ay-unit-dbus.service.drv'...
building '/nix/store/f1yppn1agksyz7qqrvmmpza1mfk5bbck-unit-dbus.service.drv'...
building '/nix/store/nrf5l3vnzvsrcwhm6mhkarhbccwjz04z-etc-profile.drv'...
building '/nix/store/ghc3pyqr4rc957ml273bgl3c724hygjp-unit-emacs.service.drv'...
building '/nix/store/8kdxvy66dyhfin10gkh158ri7s30qfdz-system-units.drv'...
building '/nix/store/sj39yhssqsw4lmxkqaqjq75rm75m9bsn-user-units.drv'...
building '/nix/store/42v5j2ayv7hnk5h7phy4vdm2vis3j247-etc.drv'...
building '/nix/store/cszks8f6wf9wk8zzv3a9akkyx4lbv852-nixos-system-nixos-19.03.172837.6c3826d1c93.drv'...
updating GRUB 2 menu...
grub-probe: error: cannot find a GRUB drive for /dev/sdd1. Check your device.map.
Found Arch Linux on /dev/sdc3
stopping the following units: acpid.service, alsa-store.service, audit.service, cpufreq.service, cups.service, docker.service, docker.socket, kmod-static-nodes.service, network-link-vboxnet0.service, network-local-commands.service, network-setup.service, nfs-idmapd.service, nfs-mountd.service, nfs-server.service, nix-daemon.service, nix-daemon.socket, nscd.service, rngd.service, rpc-statd-notify.service, rpc-statd.service, rpcbind.service, rpcbind.socket, rtkit-daemon.service, systemd-machined.service, systemd-modules-load.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-trigger.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service, vboxnet0.service
NOT restarting the following changed units: display-manager.service, [email protected], libvirt-guests.service, libvirtd.service, systemd-fsck@dev-disk-by\x2duuid-35375d90\x2d1dc3\x2d4709\x2d9c42\x2d49be406c9db6.service, systemd-fsck@dev-disk-by\x2duuid-AA07\x2d20AD.service, systemd-fsck@dev-disk-by\x2duuid-deb25ea3\x2d6f4a\x2d4d9a\x2d9028\x2d0fc653b48732.service, systemd-fsck@dev-disk-by\x2duuid-ecacdbae\x2d1af5\x2d45d9\x2d8bdb\x2d6cc8a0e1d233.service, systemd-journal-flush.service, systemd-logind.service, systemd-random-seed.service, systemd-remount-fs.service, systemd-tmpfiles-setup.service, systemd-udev-settle.service, systemd-update-utmp.service, systemd-user-sessions.service, [email protected], [email protected]
activating the configuration...
setting up /etc...
removing obsolete symlink ‘/etc/nvidia/nvidia-application-profiles-rc’...
restarting systemd...
reloading user units for chris...
setting up tmpfiles
reloading the following units: dbus.service, dev-hugepages.mount, dev-mqueue.mount, firewall.service, proc-fs-nfsd.mount, sys-fs-fuse-connections.mount, sys-kernel-debug.mount, var-lib-nfs-rpc_pipefs.mount
restarting the following units: dhcpcd.service, network-addresses-vboxnet0.service, polkit.service, sshd.service, systemd-journald.service, wpa_supplicant.service
Job for network-addresses-vboxnet0.service failed because the control process exited with error code.
See "systemctl status network-addresses-vboxnet0.service" and "journalctl -xe" for details.
starting the following units: alsa-store.service, audit.service, cpufreq.service, cups.service, docker.socket, kmod-static-nodes.service, network-link-vboxnet0.service, network-local-commands.service, network-setup.service, nfs-idmapd.service, nfs-mountd.service, nfs-server.service, nix-daemon.socket, nscd.service, rngd.service, rpc-statd-notify.service, rpc-statd.service, rpcbind.socket, rtkit-daemon.service, systemd-machined.service, systemd-modules-load.service, systemd-sysctl.service, systemd-timesyncd.service, systemd-tmpfiles-clean.timer, systemd-tmpfiles-setup-dev.service, systemd-udev-trigger.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, vboxnet0.service
Failed to start local-fs.target: Unit -.mount is masked.
Job for network-link-vboxnet0.service failed because the control process exited with error code.
See "systemctl status network-link-vboxnet0.service" and "journalctl -xe" for details.
warning: the following units failed: network-addresses-vboxnet0.service, network-link-vboxnet0.service
● network-addresses-vboxnet0.service - Address configuration of vboxnet0
Loaded: loaded (/nix/store/qdjka7ysi1r5pm2qxivfxs6sp16nh440-unit-network-addresses-vboxnet0.service/network-addresses-vboxnet0.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-06-08 13:02:31 GMT; 3s ago
Process: 15074 ExecStop=/nix/store/1cr9isn5l3w1lkdg2p672pkjyl8a8nvq-unit-script-network-addresses-vboxnet0-pre-stop (code=exited, status=0/SUCCESS)
Process: 15383 ExecStart=/nix/store/avq00fjpgkgb0dcyf3py4ipdrjs486vq-unit-script-network-addresses-vboxnet0-start (code=exited, status=1/FAILURE)
Main PID: 15383 (code=exited, status=1/FAILURE)
Jun 08 13:02:31 nixos systemd[1]: Starting Address configuration of vboxnet0...
Jun 08 13:02:31 nixos avq00fjpgkgb0dcyf3py4ipdrjs486vq-unit-script-network-addresses-vboxnet0-start[15383]: adding address 192.168.56.1/24... 'ip addr add 192.168.56.1/24 dev vboxnet0' failed: Cannot find device "vboxnet0"
Jun 08 13:02:31 nixos systemd[1]: network-addresses-vboxnet0.service: Main process exited, code=exited, status=1/FAILURE
Jun 08 13:02:31 nixos systemd[1]: network-addresses-vboxnet0.service: Failed with result 'exit-code'.
Jun 08 13:02:31 nixos systemd[1]: Failed to start Address configuration of vboxnet0.
● network-link-vboxnet0.service - Link configuration of vboxnet0
Loaded: loaded (/nix/store/7nz5xjf3a85p5wg252g0v1q2gz6sc8kk-unit-network-link-vboxnet0.service/network-link-vboxnet0.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sat 2019-06-08 13:02:31 GMT; 3s ago
Process: 15356 ExecStart=/nix/store/acvk4yj902r96a0w5j8y3ivwqpjw8ddk-unit-script-network-link-vboxnet0-start (code=exited, status=1/FAILURE)
Main PID: 15356 (code=exited, status=1/FAILURE)
Jun 08 13:02:31 nixos systemd[1]: Starting Link configuration of vboxnet0...
Jun 08 13:02:31 nixos acvk4yj902r96a0w5j8y3ivwqpjw8ddk-unit-script-network-link-vboxnet0-start[15356]: Configuring link...
Jun 08 13:02:31 nixos acvk4yj902r96a0w5j8y3ivwqpjw8ddk-unit-script-network-link-vboxnet0-start[15356]: bringing up interface... Cannot find device "vboxnet0"
Jun 08 13:02:31 nixos acvk4yj902r96a0w5j8y3ivwqpjw8ddk-unit-script-network-link-vboxnet0-start[15356]: failed
Jun 08 13:02:31 nixos systemd[1]: network-link-vboxnet0.service: Main process exited, code=exited, status=1/FAILURE
Jun 08 13:02:31 nixos systemd[1]: network-link-vboxnet0.service: Failed with result 'exit-code'.
Jun 08 13:02:31 nixos systemd[1]: Failed to start Link configuration of vboxnet0.
warning: error(s) occurred while switching to the new configuration
Attempt 2:
sudo nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
grub-probe: error: cannot find a GRUB drive for /dev/sdd1. Check your device.map.
Found Arch Linux on /dev/sdc3
activating the configuration...
setting up /etc...
reloading user units for chris...
setting up tmpfiles
Failed to start local-fs.target: Unit -.mount is masked.
warning: error(s) occurred while switching to the new configuration
Attempt 3
sudo nixos-rebuild switch
building Nix...
building the system configuration...
updating GRUB 2 menu...
grub-probe: error: cannot find a GRUB drive for /dev/sdd1. Check your device.map.
Found Arch Linux on /dev/sdc3
activating the configuration...
setting up /etc...
reloading user units for chris...
setting up tmpfiles
Failed to start local-fs.target: Unit home-chris-chrishomeold.mount is masked.
warning: error(s) occurred while switching to the new configuration
I also get this error now ..
Similar. Excerpt:
...
...
...
building '/nix/store/l9g0nd6vrkrhpqsm97rc46vm9k2807z0-nixos-system-Nix_Desk-19.09.840.8bf142e001b.drv'...
updating GRUB 2 menu...
NOT restarting the following changed units: systemd-fsck@dev-disk-by\x2dlabel-500_boot.service
activating the configuration...
setting up /etc...
reloading user units for zx...
logout
setting up tmpfiles
[/etc/tmpfiles.d/var.conf:19] Duplicate line for path "/var/cache", ignoring.
reloading the following units: dbus.service
restarting the following units: polkit.service
Failed to restart polkit.service: Unit -.mount is masked.
Failed to start basic.target: Unit -.mount is masked.
Failed to start graphical.target: Unit -.mount is masked.
Failed to start local-fs.target: Unit library.mount is masked.
Failed to start multi-user.target: Unit -.mount is masked.
Failed to start swap.target: Unit -.mount is masked.
warning: error(s) occurred while switching to the new configuration
nixpkgs is 19.09.840.8bf142e001b
@vcunat please reopen, I think we have a regression. I also have this issue. Log is basically the same:
sudo nixos-rebuild switch
[sudo] wachtwoord voor jappie:
building Nix...
building the system configuration...
activating the configuration...
setting up /etc...
reloading user units for jappie...
setting up tmpfiles
Failed to start basic.target: Unit -.mount is masked.
Failed to start graphical.target: Unit -.mount is masked.
Failed to start local-fs.target: Unit -.mount is masked.
Failed to start multi-user.target: Unit -.mount is masked.
Failed to start swap.target: Unit -.mount is masked.
warning: error(s) occurred while switching to the new configuration
It's masked in systemctl:
● -.mount masked active mounted /
Actually, in my case this may have been caused by having gparted open: https://unix.stackexchange.com/a/548996
I also got stopping the following units: -.mount
when upgrading an AWS nixops deployment from 18.03 to 20.03.
Perhaps also relevant: https://github.com/NixOS/nixops/issues/353
Got this again when adding my user to the disk
group... Hmm
I marked this as stale due to inactivity. → More info
Still relevant
Most helpful comment
Actually, in my case this may have been caused by having gparted open: https://unix.stackexchange.com/a/548996