Help getting back into my computer

When I rebooted my computer this morning, it failed. Unfortunately, as happens from time to time, none of my prior generations were listed in the boot menu, just one called Nixos. When I boot, it gets to loading the graphical interface, and hangs, and I am unable to switch to a console. All I can do is reboot. So I booted a Nixos installer from a usb key. Interestingly, when I tried to boot the plasma version, it booted, but went to a console, and running the command to start the display manager did nothing. However, the gnome version did boot, and I’m writing from that.

I’m looking for some advice as to how to proceed, and am open to suggestions. I think I would like to try rebuilding my config with gnome, to see if that works at least. There were errors during boot that I couldn’t read, and since I can’t effectively log in, I can’t view the logs. Should I reinstall Nixos? Is there a utility to make a chrooted environment for rebuilding? Is there a way to boot into a terminal instead of the graphic interface?

I’m really at a loss here. I do think that there may be underlying hardware issues, but if I can’t get in to my system, it’s hard to diagnose. The fact that I’m writing this suggests that the graphics card is at least functioning.

Thanks

Yes, mount everything relative to /mnt, then run nixos-enter.

1 Like

Do I need to mount everything in hardware-configuration.nix, or is the root directory sufficient?

Depends on a lot of details, though /boot and /nix/store and all of their parents should be available as a bare minimum. The rest depends on details in your config that we do not know nothing about.

Mount / and /boot and anything else you need to rebuild and deploy your system.

1 Like

That worked, thanks. Rebuilding worked. I do have some lingering questions, though. Like what went wrong. If a rebuild of the existing config worked, why did it fail originally? Maybe going through the logs will help, but the version that failed and the one that worked were built from the same configurations, and so theoretically are identical. I certainly can’t rule out some hardware glitch. I don’t really expect an answer, just “recovering” lol.

Anyway, thanks so much.

BTW, is there a way to force a boot into non-graphical mode from the default boot menu or would I need grub, which allows that as I recall?