View previous topic :: View next topic |
Author |
Message |
jgaz n00b
Joined: 14 Feb 2021 Posts: 42
|
Posted: Sat Dec 04, 2021 1:01 am Post subject: How do I migrate a Pi 4's root filesystem to BTRFS? |
|
|
I have two Raspberry Pi 4's, one build Gentoo ARM the other build Gentoo ARM64. I wasn't able to get the genkernel to compile, it choked about 4.5 hours into the (~6?) hour compile process. I'll have to figure that out later. I have the upstream kernel provided by the Raspberry Pi Foundation working. For now, that will do. But, I want to migrate my Pi's ext4 file system to BTRFS and I'm not sure how to do that. I'm going to be doing a lot of ebuild testing and having snapshot and rollback support will be much faster than juggling dd images of SD cards for backup.
The first time I tried to build Gentoo I formatted / as BTRFS and set cmdline.txt to expect a BTRFS file system, no joy. Is there a way to do this with the Pi kernel? Or will I have to figure out how to build sys-kernel/genkernel successfully on the Pi with --BTRFS to solve this problem?
I'm still new here, but I want to help improve Gentoo. I don't need to be a full blown Gentoo developer with git access to test ebuild on ARM and file bug reports or request a specific package be stabilized, etc. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54237 Location: 56N 3W
|
Posted: Sat Dec 04, 2021 1:31 am Post subject: |
|
|
6502,
Once the kernel gets control, there is nothing much special about the Pi.
The root on BTRFS should work.
I'm not sure what rootwait does for BTRFS and subvolumes. rootdelay=10 may be better until root mounts.
Looking at the Foundation kernel .config
Code: | /usr/aarch64-unknown-linux-gnu/usr/src/pi-kernel $ grep -i btrfs .config
CONFIG_BTRFS_FS=m
CONFIG_BTRFS_FS_POSIX_ACL=y |
So BTRFS is there but its a module.
You either need an initrd or a kernel rebuild.
The Pi4 builds the default kernel in about an hour. When you do that, fix the default frequency governor to Ondemand.
The default Powersave fixes the CPU clock to 600MHz, on about 1/3 of what the Pi is rated.
That makes the kernel build about 3 hours. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
pingtoo l33t
Joined: 10 Sep 2021 Posts: 926 Location: Richmond Hill, Canada
|
Posted: Sat Dec 04, 2021 2:19 pm Post subject: |
|
|
6502, Welcome to Gentoo on Pi
Have your tried with GenPi64? It is ready for BTRFS root.
You don't have to use GenPi64's rootfs, its kernel image is built with BTRFS. You can extract kernel from the alpha8 download.
I am using GenPi64 as my everyday desktop. It work fine as any other desktop I every use.
Personally I never tried but I suspect the same kernel should be able run ARM userland rootfs. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|