When I wrote the NixOS minimal installer to an SD card and then booted from it, it gave me the error:
Mounting tmpfs on /...
Waiting for device /dev/root to appear.......................
Timed out waiting for device /dev/root, trying to mount anyway.
blockdev: can't open '/dev/root': No such file or directory
stat: can't stat '/dev/root': No such file or directory
mount: /tmp-iso: unknown filesystem type ''.
dmesg(1) may have more information after failed mount system call.
mounting tmpfs on /iso...
mount: /mnt-root/iso: fsconfig() failed: tmpfs: Bad value for 'size'.
dmesg(1) may have more information after failed mount system call.
An error occurred in stage 1 of the boot process, which must mount the
root filesystem on `/mnt-root' and then start stage 2. Press one of the following keys:
I didn’t change any kind of configuration and ensured the SD card was synced after writing to it. I tried multiple times, on both the LTS and most recent kernel, with the same error message.
Does anyone know what’s going on? I checked EFI/BOOT/grub.cfg, and root is indeed set (as LABEL=nixos-minimal-25.11-x86_64, which is indeed the label of the first partition on the SD card), so /dev/root should exist…
I have no idea if this is relevant, but according to my firmware, the CMOS checksum is invalid (even after it seemingly tries to repair it), and (false positive) the battery is a counterfeit. It’s been raising these issues for the past few weeks but they’ve not been impacting my usual usage of my laptop - I don’t know if they could be impacting /dev/root’s nonexistence.
Sorry, I’m aware I should be patient, but I’m bumping this since I’m encountering a bad case of dependency hell on my main OS and would like to be able to install NixOS ASAP… (I’ll try rerunning the installer in a moment, maybe it’s an error that’s totally random and fixes itself, but I doubt it.)
In the installer shell, it appears that the entire directory /dev/disk/by-label does not exist, which is surely correlated with the problem since the root is passed as the LABEL. Other reports online suggest this could be related to the firmware of the live medium? It’s a 2 GB SanDisk SD card.
I mean, this also indicates something being very wrong with the laptop. This all sounds like hardware, or at least firmware failure. Hard to know if it’s the SD card, laptop, or both.
I used sudo dd if=$(ls Downloads/*.iso) of=/dev/sda bs=1M status=progress to write the image (because I was too lazy to type in nixos-minimal-....iso).
The SD card is probably bad, yes. Unfortunately, I don’t think I have any other USB drives at the moment. There’s one somewhere, but I think it’s only 1 GB and the bit of it that you insert is slightly loose. I have an external HDD but it’s got hundreds of GB of data on it.
The laptop is from 2024, so I was hoping it would stay working decently until, like, 2028. I was planning to replace the battery soon. Perhaps I could but Libreboot on it somehow…
I mean, this at least is pretty easy to solve before you give up on the laptop.
Flash is more expensive these days, but you should still be able to pop over to your closest shop and buy a new stick for the price of a packet of crisps. A functioning installation medium is probably the most minimal requirement for installing any OS.
For the record, the manual recommends this snippet:
Is there something currently installed and booting on the laptop?
One idea would be that if you find the 1GB stick you could try putting a lightweight install media (like Alpine Linux) on it, and if it boots properly that might indicate it is the SD card that’s the problem.
Right now, I use Arch, and I used the SD card as an Arch medium before I put Nix on it. I didn’t find my old stick, but there was a stationery store only 0.4 mi away selling USB sticks so I got a 64 GB one there and am about to try putting the NixOS installer on it (and if that doesn’t work, Alpine).
I put the graphical installer on the stick and it worked fine. However, the installation of NixOS failed. It gave me this link to share: https://termbin.com/8nsch. (I’m writing this post from it, since I don’t think I’d be able to boot Arch again now.)
: modprobe: FATAL: Module aes_generic not found in directory /nix/store/wa6czixakx46s4babflfgfh2dcl72q0s-linux-7.0-modules/lib/modules/7.0.0"
Heh, that’s this issue. Known temporary build failure that just happened to be current when you first tried to install, hydra must have pushed the build through by the time you tried again.