I tried to install nixos 25.05 onto an external ssd. I downloaded the graphical installer (Download | Nix & NixOS) and used balena-etcher to flash the iso to a usb. I also initialized the ssd with gpt on windows before booting into the installer. The installation crashed at around 40-something percent with:
“filesystem error: cannot create directory: Read-only file system [/tmp/calamares-root-9vid5kx5/nix/store/5xmkn8kbn69nrxsk9qk85kp00mhkjx8k-nixos-25.05.802746.7282cb574e06/nixos/pkgs/by-name/cl/cliflux]
error: writing to file: Input/output error
error: build of ‘/nix/store/5xmkn8kbn69nrxsk9qk85kp00mhkjx8k-nixos-25.05.802746.7282cb574e06’ failed
rm: cannot remove ‘/tmp/calamares-root-9vid5kx5/tmp.PrQPEBXSTq’: Input/output error”
The full log is here: https://termbin.com/wvcd
- i reinstalled the graphical iso but it was the same
- I tried rufus but it was the same
- I used a different usb for booting but it was the same
- I used that usb to install nix onto the previous usb and the installation got stuck at 46 for the whole night
Is this caused by the faulty usb, iso, ssd, or the diskpart on windows ? And is it possible to fix so that i can install nixos on the ssd ?
Thank you very much !
Hello
So first of all the installler gets “stuck” on 46% because there it installs all packages and builds them. You can see the progress if you click on the icon right next to the loading bar.
The GPT initialization on windows is not needed. The installer will do it for you.
Pleas do the installation again and if it gets “stuck” on 46% again, take a look at the console output.
Also in my experience you need to make sure that your wifi does not block port 22. I had many problems with connectivity to github on my work Wlan with that.
This part, and the more elaborate log output do point at some sort of issue, when writing to /nix/store, which likely means either of two things;
- nix itself mounts the nix store as readonly (it bind mounts it as read-only over itself) to ensure nothing accidentally writes into the nix store; there could be a bug somewhere causing issues with that, though it seems unlikely (most CI tests would probably fail if there was an issue with that, but we can’t ignore the possibility)
- there is an issue with the underlying filesystem, or disk, as you mentioned. You can check whether that’s the case when you run the installer, and when it fails switch to a console and run dmesg (or some version of journalctl, but the kernel output is the interesting part anyway) which could then potentially show some filesystem errors, like your disk running full and causing cascading failures, or running out of inodes.… there’s a lot of stuff to go wrong there even when it isn’t a hardware failure ^^