mitchellh / nixos-config

My NixOS configurations.
https://twitter.com/mitchellh/status/1346136404682625024
MIT License
1.93k stars 191 forks source link

Root account locked #38

Open peteringram0 opened 5 months ago

peteringram0 commented 5 months ago

i am getting the error "cannot open access to console, the root account is locked". I haven't seen any other issues reporting this.

Screenshot 2024-02-29 at 11 27 08
nukr commented 5 months ago

I got the same error too. Any workaround?

make vm/bootstrap output below

building '/nix/store/hsmrlapmnjsjnds0z61ripp59ia26bpx-system-units.drv'...
building '/nix/store/lx06ks0cwmk3zdk13hqp1wiml0niq5sn-etc.drv'...
building '/nix/store/m6lq9mrz0rcwl4mf7p2pypgwxwidy5zs-nixos-system-dev-23.11.20240124.a77ab16.drv'...
stopping the following units: firewall.service, network-setup.service, systemd-modules-load.service, systemd-sysctl.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket, systemd-udevd.service
NOT restarting the following changed units: -.mount
activating the configuration...
setting up /etc...
reloading user units for root...
setting up tmpfiles
reloading the following units: dbus.service
restarting the following units: boot.mount, dhcpcd.service, sshd.service
starting the following units: network-setup.service, systemd-modules-load.service, systemd-sysctl.service, systemd-udevd-control.socket, systemd-udevd-kernel.socket
Failed to start network-online.target: Transaction for network-online.target/start is destructive (emergency.target has 'start' job queued, but 'stop' is included in transaction).
See system logs and 'systemctl status network-online.target' for details.
kingscott commented 3 months ago

Following a couple of previously closed issues on this repo - I was able to get it working this morning, on an M1 Mac.

As other folks mentioned, I needed to remove references to 1Password config here: https://github.com/mitchellh/nixos-config/blob/3761a9ea73d7966282f6e1acc4f41b8c456e27f0/overlays/default.nix#L11

I also made sure to add the plymouth package to system packages. I was seeing an error at some point with plymouth failing to load.

Lastly, I noticed in the journalctl logs that host.mount couldn't be mounted. I confirmed this with:

$  systemctl status host.mount

This is an issue with sharing the host filesystem with Fuse: https://github.com/mitchellh/nixos-config/blob/3761a9ea73d7966282f6e1acc4f41b8c456e27f0/machines/vm-aarch64.nix#L26

I'm pretty new to this whole setup, NixOS included, but here's a branch I've pieced together with a working system: https://github.com/kingscott/nixos-config/tree/mitchellh-working