Nixos installer fails with nix-build: Input/output error

I am installing nixos using the gnome graphical installer (23.11). I have a Thinkpad x395 AMD laptop. I used to have an Arch and Windows dual boot, but i’m interested in erasing the disk and installing nixos.

The installer hits ~40% and crashes with the following error log: termbin.com/blbw

"nixos-install: /run/current-system/sw/bin/nixos-install: line 168: /run/current-system/sw/bin/nix-build: Input/output error"

Something I found odd: from reboot, the installer suggests autoformatting, but when it errors and I open the installer again, i only have the option to manual partition. Manually setting the /boot and / mountpoints leads to the same error as above.

The same “nix-build: Input/output error” appears when I call nix-rebuild switch from the live usb terminal. The configuration is just

{ config, pkgs, ... }:

{
  imports = [ <nixpkgs/nixos/modules/installer/cd-dvd/installation-cd-graphical-calamares-gnome.nix> ];
}

Also, just calling nix-build with no arguments results in bash: /run/current-system/sw/bin/nix-build: Input/output error. All nix specific commands do the same.

Any ideas for what could be going wrong?

Is it possible your installation media is corrupt or going bad? Alternatively is it possible your drive is going bad?

You can probably check for evidence of that in either dmesg or journctl -r.

Solved. I think the issue was probably an incomplete flash of the iso.

Can you mark the thread as solved with your last post ?

1 Like