I see I have used this in a sequence of commands that converts Trixie downloaded image to Btrfs for rootfs:I don't know or forgot the exact reason or history, but a reason could be to lower the size of the inirrd file. Look at differences between RPiOS64, Raspbian, Debian and their various main releases if you want to know. My understunading is that with 'dep' and chroot/container, you will miss modules. Can also depend on how the kernel is build, e.g. what is module and what is build-in. And most important, the RPL kernel is not the Debian kernel, latter needs to work on all ARMs and way more HW but does not with specific RPL HW.
At least in a running Debian system, if you have a Btrfs and LVM active, the then generated initramfs will include both modules.
From Ext4 to Btrfs can be done in-place as you know, LVM not unless you dig up some old risky script that could do it, I saw it but never used it or it failed.
So from running off Ext4, use extra parttion or block device to make LVM and Btrfs, rsync -a --numeric-ids rootfs to it and swap rootfs UUID in cmdline.txt and fstab changes. Tip: mount with compress-force=zstd and create subvolume, then very easy cloning and backup etc. Then reboot and then rest can all be done in running system because of Btrfs. I balanced/replaced the contents of the new Btrfs back to the Ext4 partition in the past, so assuming new root mounted on /dev/mmcblk0p3:If you don't care about partitions and LVM, just want more space, Btrfs does multidevice, no LVM needed:df to show extra space
Code:
sed -i 's/MODULES=dep/MODULES=most/g' ./etc/initramfs-tools/initramfs.confAt least in a running Debian system, if you have a Btrfs and LVM active, the then generated initramfs will include both modules.
From Ext4 to Btrfs can be done in-place as you know, LVM not unless you dig up some old risky script that could do it, I saw it but never used it or it failed.
So from running off Ext4, use extra parttion or block device to make LVM and Btrfs, rsync -a --numeric-ids rootfs to it and swap rootfs UUID in cmdline.txt and fstab changes. Tip: mount with compress-force=zstd and create subvolume, then very easy cloning and backup etc. Then reboot and then rest can all be done in running system because of Btrfs. I balanced/replaced the contents of the new Btrfs back to the Ext4 partition in the past, so assuming new root mounted on /dev/mmcblk0p3:
Code:
sudo btrfs replace start /dev/mmcblkp03 /dev/mmcblk0p2 /Code:
sudo btrfs device add /dev/mmcblk0p2 /Statistics: Posted by redvli — Tue Nov 18, 2025 10:04 am