Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
TimeShift AutoSnap & GRUB-BTRFS
New day new stuff learned.

Today, I will talk about **TimeShift Autosnap** and Grub-BTRFS. Since I have chosen to use the BTRFS file system by default by popular demand. With those 2 combined you shouldn’t be able to permanently brick your XeroLinux installation.

[Image: 4I8k3HL.jpg]

TimeShift AutoSnap

Timeshift auto-snapshot script which runs before any update|install|remove command using a DPkg:Tonguere-Invoke hook in APT. Works best in BTRFS mode, but RSYNC is also supported (might be slow though).


- Creates Timeshift snapshots with a unique (customizable) comment.
- Keeps only a certain number of snapshots created using this script.
- Deletes old snapshots which are created using this script.
- Makes a copy with RSYNC of /boot and /boot/efi to /boot.backup before the call to Timeshift for more flexible restore options.
- Can be manually executed by running sudo timeshift-autosnap-apt.
- Autosnaphots can be temporarily skipped by setting “SKIP_AUTOSNAP” environment variable (e.g. "sudo SKIP_AUTOSNAP= apt upgrade")
- Supports grub-btrfs which automatically creates boot menu entries of all your btrfs snapshots into grub.

For a tutorial how to use this script in production to easily rollback your system, see System Recovery with Timeshift.


Improves Grub by adding “btrfs snapshots” to the Grub menu. You can boot your system on a “snapshot” from the Grub menu. Supports manual snapshots, snapper, timeshift

What does grub-btrfs do :

- Automatically List snapshots existing on root partition (btrfs).
- Automatically Detect if “/boot” is in separate partition.
- Automatically Detect kernel, initramfs and intel/amd microcode in “/boot” directory on snapshots.
- Automatically Create corresponding “menuentry” in grub.cfg
- Automatically detect snapper and use snapper’s snapshot description if available.
- Automatically generate grub.cfg if you use the provided systemd service.


Just note that it will take a few package installs before autosnap & grub btrfs kick in, and first one will complain of an error 256 which can be ignored unless you set up a home subvolume. It works correctly after that. I dunno why that happens, in case you encounter those issues, you might need to do some configuration I think. For more info about Grub-BtrFS click –> Here and for for more about Timeshift-Autosnap –> Here

Ok, so now you have an idea of what will be added. Please try them when next ISO gets released, and comment letting me know how it goes for ya would help me greatly…
~ XeroLinux Toolkit Maintainer ~
I do try to help where I can, when I can.
I do this on my own, so I might not have all the answers.
[Image: K7U76Mv.png]

Possibly Related Threads…
Thread Author Replies Views Last Post
  Switch from Grub to Systemd-boot DarkXero 0 1,562 09-03-2022, 04:59 PM
Last Post: DarkXero
  Grub issue not booting ? DarkXero 0 7,118 08-25-2022, 09:00 PM
Last Post: DarkXero
  Boot with Grub via rEFInd any other partitions and iso's cristina223 0 1,663 04-19-2022, 02:10 PM
Last Post: cristina223
Video [Videos] New BTRFS & Snapper Tools Explained DarkXero 0 1,694 02-10-2022, 02:57 PM
Last Post: DarkXero

Forum Jump:

Users browsing this thread: 1 Guest(s)