cd /mnt/tmp/myconfig
sudo nixos-install --root /mnt --flake ".#someName"
Error:
copying channel...
installing the boot loader...
setting up /etc...
/etc/tmpfiles.d/journal-nocow.conf:26: Failed to resolve specifier: uninitialized /etc detected, skipping
All rules containing unresolvable specifiers will be skipped.
updating GRUB 2 menu...
Can't exec "/bin/sh": No such file or directory at /nix/store/xxxxxxxxxxxxxx-install-grub.pl line 51.
Failed to execute: /nix/store/yyyyyyyyyyyy-util-linux-2.36.2-bin/bin/blkid -o export /dev/sdb2
I’m new to NixOS, and stuck trying to bootstrap a nixos flake config.
I cloned someones config(without grub) and tried to install it but I get an error.
Could anyone guide me in the right direction to troubleshoot it further.
I build my own iso: minimal + flakes + isoImage.contents myconfig + keyMap colemak, tried it with gnome-iso, same error.
Partitioned a disk(single & mirror) with grub boot + zfs native encryption.
copy the myconfig to /mnt/tmp/myconfig
My partitioning should work, I’m currently running it on a different system without flakes.
I think it has to do with grub, but I ‘need’ grub for the ‘grub.mirroredBoots’.
Should I first install a flake-less nixos and then boot it and switch it to flakes ?
I tried nixos-install from a flake a few months ago, i couldn’t get it to work then. Things might be different now…
This may help you… it’s not exactly your problem, but if i’m reading it right, it maybe related… at least it may get some attention.
flakes are experimental, so if you want to get up and running, it’s certainly acceptable to install your system using a non-flake configuration, and convert it flakes once the system is up and running.
When i get a moment i will try install from a flake again, and see how it rolls.
There’s certainly a lot more collective knowlege on non-flake install then flake ones…but that will change over time…
In theory it should be possible, in practice the tooling might need to be updated :-).
First thing, please everyone remember flakes are (mostly) some nice sugary syntax and tooling for handling/managing imports. At the end, the Nix derivations and build products are the same regardless of whether or not flakes were involved.
In this case, we’re building a nixos system toplevel, and in this case, the toplevel was built successfully.
What the OP has presented is instead an activation error, which usually means that something is mis-matched between the running system and the configured boot loader settings. Or that /boot isn’t mounted. Things of that nature.
In this case, I’m not very sure, but I’d suggest that maybe you’ve instructed grub to install to /dev/sdb2 and that’s maybe not correct to do so.
@mackenzie, can you elaborate. What are your boot.loader settings, do you UEFI boot, etc?
Can't exec "/bin/sh": No such file or directory at /nix/store/xxxxxxxxxxxxxx-install-grub.pl line 51.
Hm, I keep coming back to this, /bin/sh even exists on NixOS and presumably the util-linux store path for blkid exists too… Is there an arch mis-match somewhere? Sometimes if you execute an arm64 bnary on amd64 you get an error something similar to that.
When I run blkid, I get a different UUID for /dev/sdb2 than the one in hardware-configuratation.nix.
I run nixos-generate-config before the nixos-install
Similar UUID mismatch for /dev/sdc2
Odd, seems like that would arise from generating the config and then re-part/re-formatting and getting new UUIDS? Anyway, hardly seems like it can be right if they don’t match. Unlikely to hurt anyway.