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

How to build (sd-)image with Btrfs root filesystem?

Open onny opened this issue 1 year ago • 3 comments

Hey, would like to build an image with Btrfs as root filesystem for the VisionFive2 since I'm using NixOS on a NVME drive and would like to use Btrfs snapshot and send/receive features on the system.

My current approach will be compiling U-Boot with Btrfs FS support and converting the existing Ext4 rootfs to Btrfs using btrfs-convert.

Regards Jonas

onny avatar Jan 16 '25 12:01 onny

Maybe disko-install assuming uboot is compatible with nixos-install?

Mic92 avatar Jan 17 '25 13:01 Mic92

I think it is better to just use EFI boot from U-Boot if you want alternative rootfs filesystem. I'm currently experimenting this and got bcachefs working on ROCK 4C Plus.

RadxaYuntian avatar Jan 20 '25 09:01 RadxaYuntian

There is edk2 for UEFI: https://github.com/starfive-tech/edk2 but can't tell how easy and reliable it is to flash to the visionfive2. Given that these boards already have an EMMC, I wished they would just ship it with preflashed emmc/edk2.

Mic92 avatar Jan 20 '25 09:01 Mic92