PINE64
Installed Arch Phosh On Btrfs Root - Printable Version

+- PINE64 (https://forum.pine64.org)
+-- Forum: PinePhone Pro (https://forum.pine64.org/forumdisplay.php?fid=177)
+--- Forum: PinePhone Pro Software (https://forum.pine64.org/forumdisplay.php?fid=179)
+--- Thread: Installed Arch Phosh On Btrfs Root (/showthread.php?tid=16029)



Installed Arch Phosh On Btrfs Root - kaida - 02-08-2022

I successfully succeeded in having My Root filesystem use Btrfs , next step is to play with snapper
[Image: Btrfs-pinephone-Pro.jpg]

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


RE: Installed Arch Phosh On Btrfs Root - kaida - 02-12-2022

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

[Image: ppp-snapper-list.jpg]


RE: Installed Arch Phosh On Btrfs Root - xnopasaranx - 02-16-2022

Very cool, looking forward to a guide with some more details.


RE: Installed Arch Phosh On Btrfs Root - kaida - 02-16-2022

(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


RE: Installed Arch Phosh On Btrfs Root - xnopasaranx - 02-22-2022

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.


RE: Installed Arch Phosh On Btrfs Root - xnopasaranx - 02-22-2022

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.


RE: Installed Arch Phosh On Btrfs Root - kaida - 02-22-2022

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