02-08-2022, 09:25 PM
(This post was last modified: 02-08-2022, 09:26 PM by kaida.)
I successfully succeeded in having My Root filesystem use Btrfs , next step is to play with snapper
Will soon post a guide on how to , for those wanting to know / try
but basically goes as follow :
Started by flashing an image of arch phosh
backed up the filesystem in a tar
setting up an ext4 boot partition and the Btrfs partition and subvolumes
extracting the fs from the tar back into the mounted btrfs layout
added some arguments to boot.txt inside /boot ( extraargs=rootflags=subvol=@ rootfstype=btrfs ) to the setenv line
regenerated a boot.scr with mkimage
fixed fstab with uuid
Got a Snapper Config running on it ! , Currently restoring them from pc , but will probably flash tow-boot and a minimal install on emmc to restore from there if anything break
Very cool, looking forward to a guide with some more details.
(02-16-2022, 04:15 PM)xnopasaranx Wrote: Very cool, looking forward to a guide with some more details.
https://github.com/K-arch27/pinebtrfs
Thank you so much! The guide and scripts are very helpful, I am going through the process right now. So far everything is going really well and I am also glad to have used the occasion to finally back up my PPP arch install.
02-22-2022, 07:38 PM
(This post was last modified: 02-22-2022, 08:01 PM by xnopasaranx.
Edit Reason: formatting, added a snippet from the original pinebtrfs.sh script for easy mounting
)
Well... I got stuck fairly hard after the last steps. I disabled the splash screen in boot.txt and was able to see the error message, "filesystem btrfs unknown". I had to chroot into the system by booting from an sdcard, mounting the btrfs filesystem
Code: #!/bin/bash
BOOTUUID=$(blkid -o value -s UUID /dev/mmcblk) # your boot partition
ROOTUUID=$(blkid -o value -s UUID /dev/mmcblk) # your root partition
mount UUID=${ROOTUUID} -o compress=zstd /mnt
mkdir /mnt/.snapshots
mkdir /mnt/opt
mkdir /mnt/root
mkdir /mnt/srv
mkdir /mnt/tmp
mkdir -p /mnt/usr/local
mkdir -p /mnt/var/cache
mkdir /mnt/var/log
mkdir /mnt/var/spool
mkdir /mnt/var/tmp
mkdir /mnt/boot
mkdir /mnt/home
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/.snapshots /mnt/.snapshots
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/opt /mnt/opt
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/root /mnt/root
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/srv /mnt/srv
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/tmp /mnt/tmp
mount UUID=${ROOTUUID} -o noatime,compress=zstd,ssd,commit=120,subvol=@/usr/local /mnt/usr/local
mount UUID=${ROOTUUID} -o noatime,ssd,commit=120,subvol=@/var/cache /mnt/var/cache
mount UUID=${ROOTUUID} -o noatime,ssd,commit=120,subvol=@/var/log,nodatacow /mnt/var/log
mount UUID=${ROOTUUID} -o noatime,ssd,commit=120,subvol=@/var/spool,nodatacow /mnt/var/spool
mount UUID=${ROOTUUID} -o noatime,ssd,commit=120,subvol=@/var/tmp,nodatacow /mnt/var/tmp
mount UUID=${BOOTUUID} /mnt/boot
and then a simple
Code: mkinitcpio -p linux-megi
did the trick. You should really mention this in your guide though, people who are not familiar with arch might screw up their install and not know what to do.
02-22-2022, 10:52 PM
(This post was last modified: 02-23-2022, 10:01 PM by kaida.)
yeah I'm still testing things out , might also need to remove the fsck hook from the mkinicpio.conf , but also I'm making ready to flash image of Arch phosh/plasma/sxmo for those not familiar with arch/linux
Edit : image are now uploaded to the Github page and the guide as been updated a bit to be more clear
|