nixos-generators icon indicating copy to clipboard operation
nixos-generators copied to clipboard

Ability to specify file system?

Open onsails opened this issue 1 year ago • 4 comments

I've successfully created a bootable sdcard with sd-image-aarch64-new-kernel-installer.nix module which boots on raspberry pi 4.

However this image is using zfs with bpool and rpool pools. I suppose it happens because the host machine I use to build image is using zfs with exactly the same pools. Is it possible to change file system to ext4?

onsails avatar Aug 22 '22 19:08 onsails

+1 -- just came to create an issue about filesystems.

I've been tinkering with a BTRFS-based Raspberry Pi 3 image for quite a while now: https://github.com/n8henrie/nixos-btrfs-pi

I'm able to get an image that boots and works fine from the linked repo, but it takes an hour or so. I created a flake using nixos-generators that takes the same configuration.nix, mounts the resulting image, and copies everything onto a BTRFS layout in a VM (also tried with btrfs-convert). It creates the image much more quickly, which is great, but the resulting image won't boot for some reason. If nixos-generators natively supported a configurable filesystem I might be in business.

n8henrie avatar Sep 26 '22 22:09 n8henrie

hmm, we could try to add a script option to make-disk-image.nix (in nixpkgs) we then could use for example https://github.com/nix-community/disko to create whatever filesystem/bootloader combination we would want?

Lassulus avatar Oct 26 '22 19:10 Lassulus

Agreed, disko support would be awesome!

arjan-s avatar Nov 29 '23 21:11 arjan-s

there is now an image builder in disko: https://github.com/nix-community/disko/blob/master/docs/reference.md#generating-disk-images-with-secrets-included-using-disko

Lassulus avatar Nov 29 '23 23:11 Lassulus