Repository navigation
Open
Labels
Description
Platform
Raspberry Pi 4b, 4GB
Install Media:
- Booted from SD card
- name: nixos-image-sd-card-26.11pre1105037.1c89083e451e-aarch64-linux.img.zst
- hydra job link: https://hydra.nixos.org/build/351574854
Additional information
- Somehow I used the little extra space in the / partition, maybe by running
nix-shell -p neovim - I was out of space on the built-in / ext4 partition, which also ran /nix/store and /tmp.
- I tried mounting a new btrfs partition of 12 GB with the contents of /nix/store (copied during mkfs) on top of /nix/store, but I still had errors (maybe from the /tmp being full?), and it wouldn't let me unmount it because that's the entire system, so I had to reboot.
- I tried to do a GC with nix-store --gc, and it failed because of disk space
- I tried mounting a tmpfs on /tmp-new, cp'ing systemd's files over there, and then bind mounting /tmp-new to /tmp, and it helped some but not enough...
- I unwisely decided to delete /nix/var/nix/db/db.sqlite, thinking that a command could regenerate it from the nix store
- It turns out such a command doesn't seem to exist, and I even found a stackoverflow post saying to do a nixos-install at that point (it was about someone having a corrupted database instead of deleting it).
- I reorganize my btrfs partition so there's a subvolume for its /, /home, and /nix
- I mount the btrfs partition on /mnt
- Having pointed the basic wrapper-flake at nixos-unstable, I run nixos-install --flake, and it does nothing.
- I am confused, and read the nixos-install --help.
- It says --flake takes a
flakeargument. - I try using the host system's config a couple times (I'd generated and edited it in /etc/nixos, and then copied it to /mnt/etc/nixos)
- Eventually I realize that I should pass
/mnt/etc/nixosinstead? - At some point in that, I get an inscrutible error about it looking for a flake in /mnt/home and not finding one, and then it gives up. The only place I had put a /home was in my filesystem configuration in
hardware-configuration.nix, and as the other subvolume in /mnt. The default subvolume was /. - I find a file in ~/.nix on the host system that looks like it points to the local unpacked
nixos-image-sd-card-26.11pre1105037.1c89083e451e-aarch64-linuxas a channel or something? I don't touch it because I don't know the format, and nix-channel looks like it wanted to rebuild the system. - When I try to do a nixos-install using the
--flakeswitch, it tries to copy something that looks like the above channel to my new installation, but says it doesn't exist. At one point I tried copying that store path over manually, but I think that didn't work either. - When I try to do a nixos-install without
--flake, it seems to want to use local store paths ? I forget how that errors. - When I try to do a
nixos-install --channel nixos-unstable --flake /mnt/etc/nixos/#${HOSTNAME}(with the right hostname for my flake configuration), it sayscopying channel...and slowly talks about many renames, starting withcoq-packagesbeing deprecated in favor ofrocq-packages. The memory usage grows pretty quickly, until the kernel oom-kills the nix process.- What channel is it trying to copy?
- What is the correct form for a channel? (I know it's in the docs, but this should be part of or linked from the error that isn't there...)
Output
Not easily copyable because the machine does not have a windowing system yet.
Should I copy logs of some kind? The system is still setup.
Checklist
- checked [latest Nix manual] ([source])
- Checked for what?
- checked [open installer issues and pull requests] for possible duplicates
- Too many hits for "nixos-install oom", but no title describing the same thing?
- reviewed the [contributing guide]
Activity
xokdvium commentedon Nov 12, 2026
I'm not 100% sure this belongs in the nix repo at this point? This is NixOS installer, not Nix installer related. So maybe try getting this filed in nixpkgs repo too?
NaN-git commentedon Nov 12, 2026
@cplir-c This does not seem to be a nix issue. When I encounter OOM issues on my RPi then I just reduce the number of parallel builds and threads per build. You can check whether adding
--cores 1to thenixos-installcommand helps.cplir-c commentedon Nov 12, 2026
I didn't know that nixos-install was an "installer" -- I thought an installer would be more interactive, or at least fall back on it like in other distributions with install scripts I've used (Fedora Kinoite, Alpine).
There's a few things here that're nix itself:
nix-store --gcneeding storage to garbage collect when plenty of RAM was availableAlso, I had to
pkill --sig sigkilla few nix processes, and they must've left their locks in place, because they seemingly just checked if it was still there every second or two (looking attop), and didn't emit any warnings or anything. I ended up deleting /nix/var/nix/db/big-lock and /nix/var/nix/gc.lock when no nix processes were running, so it could continue?cplir-c commentedon Nov 12, 2026
Thanks, I'll try this!
xokdvium commentedon Nov 12, 2026
This is unavoidable because sqlite.
Entirely impossible, at least in the current store model where references are other metadata is only available in the database. For references, there's no way to recover those as those are only known from the context.
I think all the above issues have their corresponding issues though.
xokdvium commentedon Nov 12, 2026
Note that there's already a hack to pre-reserve some spare space on disk that could get freed up when GC-ing in a full-disk situation although it doesn't work on some filesystems AFAIK.
cplir-c commentedon Nov 12, 2026
The backing filesystem was ext4.
If that's it, this issue can probably be closed.
Could one of you link me to where I can report nixos-install issues? (I don't know what nixpkgs package contains it)
Oh right!
A couple of ideas: