Skip to content

Latest commit

 

History

History
58 lines (42 loc) · 2.28 KB

README.md

File metadata and controls

58 lines (42 loc) · 2.28 KB

Btrfs on ARCH-LINUX(no liability in case of data loss)

this process allows us to change filesystems even if we have other partitions on our ssd.

Pros and Cons of Using Btrfs Filesystem in Linux

  1. in case you would like to use Arch vanilla you can execute the first commands concerning the creation of the subvolumes and then start the clean installation.

  2. if instead you want to use an Arch-based distro, after creating the subvolumes you can start the installation of the latter via the graphical interface and through a bug force the assignment of BTRFS as filesystem (you have to assign and uncheck the box several times partition on which we want to install and after 2-3 attempts the game is done)

for the first part it is necessary to install the pure Arch iso and using the

fdisk -l

command we go to choose the partition where we want to configure our BTRFS filesystem and execute the commands below:

mkfs.btrfs /dev/<partition main>
mount /dev/<partition main> /mnt
btrfs subvolume create /mnt/@
btrfs subvolume create /mnt/@home
umount -R /mnt
mount -o subvol=@ /dev/<partition main> /mnt
mkdir -p /mnt/home
mount -o subvol=@home /dev/<partition main> /mnt/home
mount

now we have to use the graphical installer of our favorite distro and while choosing the partition and through a bug force the assignment of BTRFS as filesystem (you have to assign and uncheck the box several times partition on which we want to install and after 2- 3 attempts the game is done).

once the installation has been successful it is possible to start the installation of the packages necessary for the management of the snapshots via grub to allow us to restore the system even when the latter does not start:

sudo pacman -S btrfs-progs grub-btrfs
yay -S cronie timeshift-bin timeshift-autosnap
sudo systemctl enable cronie
sudo systemctl start cronie

small script that allows us to upload all snapshots generated by timeshift to grub (in my case every 2 hours) with cronie:

nano <namefile.sh>
    sudo grub-mkconfig -o /boot/grub/grub.cfg
chmod 777 <namefile.sh>

and now let's create the routine:

sudo EDITOR=nano crontab -e
    0 */2 * * * <$PATH/namefile.sh> ---> every two hours every day
sudo crontab -l

HAVE FUN!!