ubuntu 20.04 btrfs installation
11 Jul 2021Steps
- Unmount / target and mount the disk on / mnt.
umount -l /target mount /dev/sda2 /mnt
- Move all files and folders to a subvolume.
cd /mnt btrfs subvolume create @ rm swapfile mv * @
- Unmount
/mnt
to mount all the devices needed for your system.umount /mnt mount -o subvol=@ /dev/sda2 /target mount /dev/sda2 /target/boot/efi mount --bind /proc /target/proc mount --bind /dev /target/dev mount --bind /sys /target/sys
- Edit fstab to set the appropriate mount point for the subvolume.
vi /etc/fstab UUID=xxxx / btrfs defaults,noatime,subvol=@ 0 1 # /swap/swapfile none swap sw 0 0
- Update GRUB.
update-initramfs -u -k all grub-install --recheck /dev/sda update-grub
References
- https://linuxtut.com/en/d34053037468488eacab
- https://askubuntu.com/questions/1204802/where-are-my-btrfs-subvolumes
: