Video

Greetings

Manjaro 21.0 Full Install with btrfs + snapper + grub-btrfs

Hi all, in this video i will show how to install Manjaro 21.0 with btrfs + snapper + grub-btrfs.

btrfs is a modern copy on write (CoW) filesystem for Linux.

Snapper is a tool created by openSUSE’s Arvin Schnell that helps with managing snapshots of Btrfs subvolumes.

grub-btrfs include btrfs snapshots in GRUB boot options.

I hope you enjoy!

Links

  1. btrfs - ArchWiki
  2. Manjaro Site
  3. grub-btrfs Github
  4. Snapper ArchWiki

Steps

1. Editing Calamares

We need edit two files, i like vim so:

Open the terminal and type:

$ sudo pacman -Syy
$ sudo pacman -S vim

/usr/share/calamares/modules/fstab.conf

$ sudo [vim|nano] /usr/share/calamares/modules/fstab.conf

And change line 16 to:

btrfs: noatime,space_cache,autodefrag,compress=zstd  

Change line 44 to:

btrfs: ssd,noatime,compress=zstd,commit=120,autodefrag,space_cache  

/usr/share/calamares/modules/mount.conf

$ sudo [vim|nano] /usr/share/calamares/modules/mount.conf

Append this lines to the end of file:

- mountPoint: /.snapshots
  subvolume: /@snapshots

2. Install

Start the Manjaro Calamares installer.

Partitioning

We will create three partitions:

Follow the video

3. Snapper

We dont need no more Timeshift because we will have snapper with snapshots timeline enabled. So, disable Timeshit, follow the video

After update and Upgrade your system, open the terminal and type:

$ sudo pamac remove timeshift
$ sudo pamac install snapper snapper-gui
$ sudo umount /.snapshots
$ sudo rm -rf /.snapshots
$ sudo snapper -c root create-config /
$ sudo btrfs subvolume delete /.snapshots
$ sudo mkdir /.snapshots
$ sudo chmod 750 /.snapshots
$ sudo chmod a+rx /.snapshots
$ sudo chown :theduckchannel /.snapshots
$ sudo mount -a

Edit the file /etc/snapper/configs/root:

$ sudo [vim|nano] /etc/snapper/configs/root 

Place your username on line 21 between the quotation marks.

ALLOW_USERS="your_username_here"

Go to line 50 and change to:

# limits for timeline cleanup
TIMELINE_MIN_AGE="1800"
TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAILY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT_YEARLY="0"

This parameters are sugestion on ArchWiki with only 5 hourly snapshots, 7 daily ones, no monthly and no yearly ones.

4. Start the Services

$ sudo systemctl enable --now snapper-timeline.timer
$ sudo systemctl enable --now snapper-cleanup.timer
$ sudo systemctl enable --now grub-btrfs.path

5. Update Grub

Edit the file /etc/default/grub:

$ sudo vim /etc/default/grub

Comment the line 3:

#GRUB_TIMEOUT_STYLE=hidden

And type on terminal:

$ sudo grub-mkconfig -o /boot/grub/grub.cfg

6. Your First Snapshot

Follow the video

7. Finish