Links

  1. Linux Mint Download
  2. Btrfs
  3. grub-btrfs Github

0. Intro

Hi all, in this video i show how to install Linux Mint 20.2 with btrfs, snapshots and grub-btrfs.

  1. The boot mode will be efi;
  2. I’m assuming you already have the latest usb stick with the Linux Mint ISO.

I hope you enjoy!

1. Bios Considerations

  1. Reset BIOS to factory default and reboot.
  2. Disable fastboot and secure boot in BIOS settings.
  3. Make sure that SATA controller is set to AHCI mode in BIOS settings.

2. Install Linux Mint

2.1 Btrfs Options

Edit /usr/lib/partman/mount.d/70btrfs:

$ sudo nano /usr/lib/partman/mount.d/70btrfs

And Change options for root and home subvolume to:

Mount Btrfs Image

Edit /usr/lib/partman/fstab.d/btrfs.

$ sudo nano /usr/lib/partman/fstab.d/btrfs

And Change fstab options for root and home subvolume to:

Mount Btrfs Image

2.2 Start Ubiquity Installer

$ ubiquity

2.3 Partitioning

[Subtitle 2.3.1] In Installation type choose “Something else”

I will create three partitions show in screen.

[Subtitle 2.3.2] /dev/sda1 “EFI System Partition”.

[Subtitle 2.3.3] /dev/sda2 “swap area”.

[Subtitle 2.3.4] /dev/sda3 “btrfs”, Mount point is /.

2.3 Update and Upgrade your System

$ sudo apt update
$ sudo apt upgrade
$ reboot

3. Install and Config snapper

3.1 Install

$ sudo apt install snapper snapper-gui

3.2 Config

$ sudo snapper -c root create-config /
$ sudo btrfs subvolume list /
$ echo "Delete every snapshots created"
$ sudo btrfs subvolume delete /.snapshots/ etc etc
$ sudo btrfs subvolume create /@snapshots
$ sudo mkdir /.snapshots
$ sudo chmod 750 /.snapshots
$ sudo chown :theduckchannel /.snapshots

Edit /etc/snapper/configs/root:

$ sudo nano /etc/snapper/configs/root

And put your username in:

ALLOW_USERS="[yourusername]"

Change the folowing lines to:

TIMELINE_LIMIT_HOURLY="5"
TIMELINE_LIMIT_DAYLY="7"
TIMELINE_LIMIT_WEEKLY="0"
TIMELINE_LIMIT_MONTHLY="0"
TIMELINE_LIMIT-YEARLY="0"

Save the file and exit.

4. Fstab

Edit /etc/fstab:

Follow the video…

$ sudo mount -a
$ lsblk
$ sudo btrfs subvolume list /

5. Install grub-btrfs

$ sudo apt install git
$ git clone https://github.com/Antynea/grub-btrfs
$ cd grub-btrfs
$ sudo make install
$ 
$ sudo grub-install --target=x86_64-efi \
--efi-directory=/boot/efi \
--bootloader-id=GRUB
$ sudo grub-mkconfig -o /boot/grub/grub.cfg

6. Start the Services

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

7. Your First Snapshot

Follow the video…

8. Finish