Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Minimum requirements for Disko #947

Open
bittner opened this issue Jan 20, 2025 · 6 comments
Open

Minimum requirements for Disko #947

bittner opened this issue Jan 20, 2025 · 6 comments

Comments

@bittner
Copy link
Contributor

bittner commented Jan 20, 2025

I see there is a System Requirements article in the wiki that is yet to be populated.

> 4 GB RAM required?

Today, I tried to set up a laptop with 4 GB RAM with Disko. I booted a NixOS minimal ISO using a USB stick and started Disko for partitioning only. Disko started downloading dependencies but eventually ran out of memory before it could even start partitioning.

I assume what ran out of space was the RAM disk that the ISO installer is running on. Does that mean that 4 GB RAM are not sufficient to run Disko?

Is there any workaround to make Disko run successfully on systems with modest hardware characteristics?

@Mic92
Copy link
Member

Mic92 commented Jan 20, 2025

You might have better luck by having an image that has disko already installed by default so that you are not downloading another copy of nixpkgs.
Disko itself shouldn't have significant system resource requirements. Less than a normal nixos evaluation for sure.

@Mic92
Copy link
Member

Mic92 commented Jan 20, 2025

How are you running disko? Maybe try nix-shell -p disko instead of nix run github:nix-community/disko?

@bittner
Copy link
Contributor Author

bittner commented Jan 20, 2025

I figured that it's my flake that downloads all that stuff!

If I simply fetch my disko-config.nix and run disko with it the partitioning can start successfully. I run disko the usual way, as described in the Quickstart documentation:

sudo nix --extra-experimental-features "nix-command flakes" run github:nix-community/disko/latest -- \
  --mode destroy,format,mount disko-config.nix

But then again, after partitioning, wouldn't nixos-install fail when I attempt to run my flake with it?—How much is a successfully prepared disk worth when the installer can't proceed? Is there a way around this problem?

@Mic92
Copy link
Member

Mic92 commented Jan 20, 2025

nixos-install shouldn't go out-of-memory because it can install the target file system and doesn't need to store everything memory.

@delmilio
Copy link

delmilio commented Jan 29, 2025

@bittner I was also running into this trying to follow the disko install guide in a VM with 4GB. Even increasing the amount of RAM to 6GB, I was running out of memory.

I was able to work around the OOM by mounting another virtual disk and creating a 2GB swap file on it. However, I still wasn't able to get a complete install to verify.

Hopefully that's all you need, but now I'm running into No space left on device, even with a 32GB installation target drive. I think both of my issues are stemming from /nix being mounted on tmpfs (findmnt -T /nix) , which seems to be a RAM disk in my case.

I haven't had the time to test yet, but my next step was going to try remounting either /nix or /nix/store to some larger bulk device during the install.

@dzmitry-lahoda
Copy link

I got it working with 8GB well in qemu. 4GB was OoM for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants