How do I use Timeshift/btrfs to permanently restore to a previous snapshot?

I’ve been using Manjaro for a couple years now. When I did a reinstall with btrfs I was pleasantly surprised to see how Timeshift and grub-mkconfig was all automatically configured to boot to any previous snapshots created. I tested booting to previous snapshots, and it worked flawlessly! And it just felt great that it was there if I ever needed it. Unfortunately, I now need it.

What I didn’t test, is the restore feature of Timeshift. When I do the restore, upon reboot I get a warning from Timeshift saying:

Detected!
Booted into Timeshift Snapshot, please restore the snapshot.

Trying to frantically Google around with little sleep on how to fix this, so far I’m finding out this… Even though my fstab is normal, I can see my root volume is tied to this:

findmnt /

TARGET SOURCE                                                           FSTYPE OPTIONS
/      /dev/nvme0n1p2[/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@] btrfs  rw,noatime,compress=zstd:3,ssd,space_cache=v2,autodefrag,subvolid=446,subvol=/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@

Do I have to boot from a flash drive and chroot my root volume to fix this somehow? Or am I missing something simpler. This is my first install of any type of UNIX/Linux with btrfs, so I’m a little unsure the best route from here. And why the restore feature of Timeshift even does this, since it’s hard to mess up clicking Restore on a snapshot you want to restore.

If you select any root-snapshot in Grub boot menu, but Grub bootloader can not restore the root-snapshot, Grub just boots into the writable root-snapshot. Useless, Grub does not know how to restore the snapshot to specific location of subvolume, but only TimeShift knows that.

After booting to the snapshot, you need to restore the snapshot via TimeShift manually, TimeShift will replace the selected snapshot as “subvolume” with its old subvolume in the right place, then reboot again.


There is a risk:
If you ignore the hints of TimeShift “Please restore the snapshot” and keep using the writable snapshot after boot, the “good/healthy” snapshot will continue to be modified, but it will be no longer like the expected state of the snapshot.

TimeShift makes all snapshots writable by default, I don’t like that.
That’s why I use snapper, it makes all snapshots read-only by default. Read-only snapshots do not allow anyone to change their modification state and are safer than writable snapshots.

1 Like

I do agree with making all snapshots writable being a bad thing. Causing them to grow when just browsing through them, and the potential to create trees of snapshots. I also remember reading that you can’t use things like brtfs send and other features on RW snapshots.

Manjaro just came with it, I tested it, and I went on with my life. When tested it right after installing, I booted to the snapshot through grub just to see it if it worked. But as I mentioned, I did click restore in Timeshift trying to revert to the previous snapshot. And this warning appeared upon rebooting.

When you say:

you need to restore the snapshot via TimeShift manually

What do you mean exactly?

Does using it via command line do something different? Doing something like:

timeshift --btrfs --restore '2022-10-15_23-44-29' --target /dev/nvme0n1p2

Also, here is the output of lsblk -f, just in case this helps:

NAME        FSTYPE       FSVER LABEL       UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
sda                                                                                            
└─sda1      linux_raid_m 1.2   mbox:RAID-1 afb84c39-4c7a-c296-6a9c-c2059f8fcaaa                
  └─md127   ext4         1.0               76d665fb-7666-404d-8229-d22f81a40c4e    4.1T    20% /mnt/hdd
sdb                                                                                            
└─sdb1      linux_raid_m 1.2   mbox:RAID-1 afb84c39-4c7a-c296-6a9c-c2059f8fcaaa                
  └─md127   ext4         1.0               76d665fb-7666-404d-8229-d22f81a40c4e    4.1T    20% /mnt/hdd
nvme0n1                                                                                        
├─nvme0n1p1 vfat         FAT32 NO_LABEL    22BD-3A90                             298.8M     0% /boot/efi
├─nvme0n1p2 btrfs                          4dd57ba2-0498-494e-aa48-191b52801fcf  759.6G    15% /run/timeshift/2142/backup
│                                                                                              /var/log
│                                                                                              /var/cache
│                                                                                              /home
│                                                                                              /srv/nfs
│                                                                                              /
└─nvme0n1p3 swap         1     swap        9f5a3a86-21ad-4bcc-9db7-2377aee3d05c                [SWAP]
nvme1n1                                                                                        
├─nvme1n1p1 vfat         FAT32             9475-F14A                                           
├─nvme1n1p2                                                                                    
├─nvme1n1p3 ntfs                           FC2C79602C79173C                                    
└─nvme1n1p4 ntfs                           8AD2C47BD2C46CCF                                    

Thank you for your response.

Ah, I do not remember if TimeShift automatically opens a some dialog to ask you if you want to restore. Am I right?
I think TimeShift would restore automatically when you click “Yes” in the dialog of TimeShift.

I haven’t used Timeshift for a long time and pretty much forgot.

Hmm. I can’t embed a screenshot here…

But anyway… When trying to restore a snapshot, it gives you a 3 step dialog you click next through each step. The steps are just:

  1. Checkbox to include the @home volume
  2. Displays a warning that you are modifying the @ and @home volumes
  3. Displays a message: Restore Completed. And some other text saying you can continue to work on the current system, and restored subvolumes will become active after restart.

Pretty simple as far as that goes.

Sorry to reply again and bump this. But as much as I appreciated the response, even with the multiple people that used the finger up emote on it, as if it was the solution. It basically said, that I wasn’t clicking a button, and don’t even use Timeshift, because it sucks.

Though I will be moving to read only snapshots moving forward, as I’ve been wanting to use ‘brtfs send’ snapshots to my RAID 1 HDD volume, for backup purposes. And Timeshift doesn’t seem to even allow you to configure read only snapshots as an option.There is no way to configure it in /etc/timeshift/timeshift.json, or anywhere else that I can find. And there is a feature request on Github asking for this option. So I will switch to Snapper, so thank you for that information.

But anyway! Moving forward to my immediate problem.

As it stands, stock Manjaro Gnome without any custom AURs or flatpaks, I am only using official Manjaro repository packages to do QEMU/KVM (and I use VFIO/GPU passthrough); just comes with Timeshift, and just using Timeshift Restore with btrfs will cause this issue.

I’ve been able to find out this from an EndevourOS forum, with someone with the same issue:

You should probably boot off a live ISO and:

  • Rename the @ subvolume
  • Create a snapshot of /timeshift-btrfs/snapshots/2021-12-17_09-00-01/@ at @
  • arch-chroot into your system and run grub-mkconfig
  • Take a look at the generated grub.conf and make sure you aren’t loading the snapshot root anymore.

I have used chroot many times, but never with btrfs. But I believe this is the route I have to go from here.

Correct me if I’m wrong?

Can you show us lsblk -f and sudo btrfs subvolume list / and sudo btrfs subvolume get-default / ?

I posted lsblk -f already (and findmnt / in the OP).

btrfs subvolume list /
ID 258 gen 361244 top level 5 path @cache
ID 259 gen 361634 top level 5 path @log
ID 424 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-09-16_21-24-30/@
ID 425 gen 308759 top level 5 path timeshift-btrfs/snapshots/2022-09-16_21-24-30/@home
ID 426 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-09-27_13-42-49/@
ID 427 gen 324853 top level 5 path timeshift-btrfs/snapshots/2022-09-27_13-42-49/@home
ID 428 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-09-27_18-45-41/@
ID 429 gen 325443 top level 5 path timeshift-btrfs/snapshots/2022-09-27_18-45-41/@home
ID 430 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-01_22-54-26/@
ID 431 gen 331811 top level 5 path timeshift-btrfs/snapshots/2022-10-01_22-54-26/@home
ID 432 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-01_22-54-36/@
ID 433 gen 331815 top level 5 path timeshift-btrfs/snapshots/2022-10-01_22-54-36/@home
ID 434 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-09-10/@
ID 435 gen 338030 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-09-10/@home
ID 436 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-12-52/@
ID 437 gen 338040 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-12-52/@home
ID 438 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-22-32/@
ID 439 gen 338062 top level 5 path timeshift-btrfs/snapshots/2022-10-06_20-22-32/@home
ID 440 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-10_21-21-55/@
ID 441 gen 343960 top level 5 path timeshift-btrfs/snapshots/2022-10-10_21-21-55/@home
ID 442 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-11_20-13-42/@
ID 443 gen 345349 top level 5 path timeshift-btrfs/snapshots/2022-10-11_20-13-42/@home
ID 444 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-11_20-14-24/@
ID 445 gen 345354 top level 5 path timeshift-btrfs/snapshots/2022-10-11_20-14-24/@home
ID 446 gen 361632 top level 5 path timeshift-btrfs/snapshots/2022-10-15_23-44-29/@
ID 447 gen 357910 top level 5 path timeshift-btrfs/snapshots/2022-10-15_23-44-29/@home
ID 452 gen 359257 top level 5 path timeshift-btrfs/snapshots/2022-10-19_07-30-18/@home
ID 453 gen 359253 top level 5 path timeshift-btrfs/snapshots/2022-10-19_07-30-18/@
ID 454 gen 361634 top level 5 path @home
ID 455 gen 359253 top level 5 path @

And…

btrfs subvolume get-default /
ID 5 (FS_TREE)

I see lsblk -f that you use mdadm + ext4 on your RAID 1. If you want to create new snapshots from Btrfs to non-Btrfs. Just use restic or borg that can do. I use restic backup to ZFS mirror RAID1 every week.

I check your Timeshift btrfs layout that looks ok. I am not sure what problem is exactly.

If you mean how to restore root-snapshot e.g. “2022-10-19_07-30-18” manually on Live USB without using timeshift GUI:

# mount -t btrfs /dev/nvme0n1p2 /mnt
# cd /mnt
# mv  @ @broken_root 
# btrfs subvolume snapshot /timeshift-btrfs/snapshots/2022-10-19_07-30-18/@ @
# umount /mnt
# reboot

After reboot, if this snapshot is all ok without issue, then remove the old/broken subvolume @broken_root

If GRUB bootloader fails, restoring root-snapshot does not help because Grub is outside Btrfs filesystem. you should manually fix grub via manjaro-chroot.

# mount -t btrfs /dev/nvme0n1p2 /mnt
# manjaro-chroot /mnt/@
# mount /boot/efi
# Fix Grub what you know...
# exit
# umount /mnt
# reboot

Ignore the backing up and RAID set for now. That’s just what I had setup before before I did a reinstall with my first time on a btrfs filesystem. I’ll probably redo that whole RAID set/volume, now that I know more about btrfs.

It’s just that every time I reboot I get the warning from Timeshift:

Detected!
Booted into Timeshift Snapshot, please restore the snapshot.

Which made me panic, especially at first, that I did something wrong. My system is usable, and I’ve been just troubleshooting and learning btrfs more along the way. I’m just unsure why Timeshift is barking at me, and what is wrong.

I don’t know what the output of this command was before, but as far as I can tell, it shouldn’t be this (going from the other forum post I mentioned that was getting the same Timeshift warning).

findmnt /
TARGET SOURCE                                                           FSTYPE OPTIONS
/      /dev/nvme0n1p2[/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@] btrfs  rw,noatime,compress=zstd:3,ssd,space_cache=v2,autodefrag,subvolid=446,subvol=/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@

I see, you are using this snapshot of system.

$ sudo mount -t btrfs -o subvol=/ /dev/nvme0n1p2 /mnt
$ cd /mnt
$ ls -al

Then you can show us: $ ls -al

and what is the output of cat /etc/fstab ?


Edit:

Try to restore the snapshot in Timeshift GUI again, then reboot. Does it work?

I’ve tried 3 restores total now. Same thing every time.

mount -t btrfs -o subvol=/ /dev/nvme0n1p2 /mnt/tmp
cd /mnt/tmp
ls -la
total 16
drwxr-xr-x 1 root root  62 Oct 19 07:30 .
drwxr-xr-x 1 root root  22 Sep 19 07:07 ..
drwxr-xr-x 1 root root 216 Jun 12 16:05 @
drwxr-xr-x 1 root root 148 Sep 13 02:48 @cache
drwxr-xr-x 1 root root  10 Jan 23  2022 @home
drwxr-xr-x 1 root root 422 Oct 21 00:00 @log
drwxr-xr-x 1 root root 210 Oct 18 16:42 timeshift-btrfs

cat /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a device; this may
# be used with UUID= as a more robust way to name devices that works even if
# disks are added and removed. See fstab(5).
#
# <file system>             <mount point>  <type>  <options>  <dump>  <pass>
UUID=22BD-3A90                            /boot/efi      vfat    umask=0077 0 2
UUID=4dd57ba2-0498-494e-aa48-191b52801fcf /              btrfs   subvol=/@,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=4dd57ba2-0498-494e-aa48-191b52801fcf /home          btrfs   subvol=/@home,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=4dd57ba2-0498-494e-aa48-191b52801fcf /var/cache     btrfs   subvol=/@cache,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=4dd57ba2-0498-494e-aa48-191b52801fcf /var/log       btrfs   subvol=/@log,defaults,noatime,autodefrag,compress=zstd 0 0
UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c swap           swap    defaults,noatime 0 0
UUID=76d665fb-7666-404d-8229-d22f81a40c4e /mnt/hdd      ext4    rw,relatime, 0 2
hugetlbfs    /dev/hugepages  hugetlbfs       mode=01770,gid=992    0 0
/mnt/nfs        /srv/nfs        none   bind   0   0

I guess the problem is Grub booting into the snapshot, but it does not boot into the normal system.

Check what is the output /etc/default/grub?

cat /etc/default/grub

GRUB_DEFAULT=saved
GRUB_TIMEOUT=5
GRUB_TIMEOUT_STYLE=menu
GRUB_DISTRIBUTOR="Manjaro"
#GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor resume=UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c udev.log_priority=3 amd_iommu=on vfio-pci.ids=10de:1b80,10de:10f0 vga=off"
GRUB_CMDLINE_LINUX_DEFAULT="apparmor=1 security=apparmor resume=UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c udev.log_priority=3 amd_iommu=on vfio-pci.ids=10de:2216,10de:1aef video=efifb:off"
GRUB_CMDLINE_LINUX=""

# If you want to enable the save default function, uncomment the following
# line, and set GRUB_DEFAULT to saved.
#GRUB_SAVEDEFAULT="true"

# Uncomment to disable submenus in boot menu
#GRUB_DISABLE_SUBMENU=y

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command 'videoinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment this option to enable os-prober execution in the grub-mkconfig command
#GRUB_DISABLE_OS_PROBER=false
GRUB_DISABLE_OS_PROBER=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
GRUB_COLOR_NORMAL="light-gray/black"
GRUB_COLOR_HIGHLIGHT="green/black"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/usr/share/grub/background.png"
GRUB_THEME="/usr/share/grub/themes/manjaro/theme.txt"

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"
# Uncomment to ensure that the root filesystem is mounted read-only so that
# systemd-fsck can run the check automatically. We use 'fsck' by default, which
# needs 'rw' as boot parameter, to avoid delay in boot-time. 'fsck' needs to be
# removed from 'mkinitcpio.conf' to make 'systemd-fsck' work.
# See also Arch-Wiki: https://wiki.archlinux.org/index.php/Fsck#Boot_time_checking
#GRUB_ROOT_FS_RO=true

Try to remove it or change it to #GRUB_DEFAULT=saved
Then run $ sudo update-grub
Reboot, if it works?

update-grub or grub-mkconfig?

Both are the same.
update-grub is available in Manjaro and Debian based distros. Other arch based distros do not have this, but use grub-mkconfig ....

Still get the warning. =(

Can you show us $ sudo cat /boot/grub/grub.cfg

cat /boot/grub/grub.cfg

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
insmod part_gpt
insmod part_msdos
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="${saved_entry}"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

set menu_color_normal=light-gray/black
set menu_color_highlight=green/black

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root 4dd57ba2-0498-494e-aa48-191b52801fcf
    font="/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=en_CA
  insmod gettext
fi
terminal_input console
terminal_output gfxterm
insmod part_gpt
insmod btrfs
search --no-floppy --fs-uuid --set=root 4dd57ba2-0498-494e-aa48-191b52801fcf
insmod gfxmenu
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_12.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_14.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_16.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_24.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_48.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_bold_16.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/dejavu_sans_mono_12.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-12.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-14.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-16.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-18.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-b12.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-b14.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-b16.pf2
loadfont ($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/terminus-b18.pf2
insmod png
set theme=($root)/timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/usr/share/grub/themes/manjaro/theme.txt
export theme
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-4dd57ba2-0498-494e-aa48-191b52801fcf' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod btrfs
        search --no-floppy --fs-uuid --set=root 4dd57ba2-0498-494e-aa48-191b52801fcf
        linux   /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/vmlinuz-5.15-x86_64 root=UUID=4dd57ba2-0498-494e-aa48-191b52801fcf rw rootflags=subvol=timeshift-btrfs/snapshots/2022-10-15_23-44-29/@  apparmor=1 security=apparmor resume=UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c udev.log_priority=3 amd_iommu=on vfio-pci.ids=10de:2216,10de:1aef video=efifb:off
        initrd  /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/amd-ucode.img /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/initramfs-5.15-x86_64.img
}
submenu 'Advanced options for Manjaro Linux' $menuentry_id_option 'gnulinux-advanced-4dd57ba2-0498-494e-aa48-191b52801fcf' {
        menuentry 'Manjaro Linux (Kernel: 5.15.74-3-MANJARO x64)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.74-3-MANJARO x64-advanced-4dd57ba2-0498-494e-aa48-191b52801fcf' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root 4dd57ba2-0498-494e-aa48-191b52801fcf
                linux   /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/vmlinuz-5.15-x86_64 root=UUID=4dd57ba2-0498-494e-aa48-191b52801fcf rw rootflags=subvol=timeshift-btrfs/snapshots/2022-10-15_23-44-29/@  apparmor=1 security=apparmor resume=UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c udev.log_priority=3 amd_iommu=on vfio-pci.ids=10de:2216,10de:1aef video=efifb:off
                initrd  /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/amd-ucode.img /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/initramfs-5.15-x86_64.img
        }
        menuentry 'Manjaro Linux (Kernel: 5.15.74-3-MANJARO x64 - fallback initramfs)' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.74-3-MANJARO x64-fallback-4dd57ba2-0498-494e-aa48-191b52801fcf' {
                load_video
                set gfxpayload=keep
                insmod gzio
                insmod part_gpt
                insmod btrfs
                search --no-floppy --fs-uuid --set=root 4dd57ba2-0498-494e-aa48-191b52801fcf
                linux   /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/vmlinuz-5.15-x86_64 root=UUID=4dd57ba2-0498-494e-aa48-191b52801fcf rw rootflags=subvol=timeshift-btrfs/snapshots/2022-10-15_23-44-29/@  apparmor=1 security=apparmor resume=UUID=9f5a3a86-21ad-4bcc-9db7-2377aee3d05c udev.log_priority=3 amd_iommu=on vfio-pci.ids=10de:2216,10de:1aef video=efifb:off
                initrd  /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/initramfs-5.15-x86_64-fallback.img
        }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
        fwsetup
}
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/35_fwupd ###
### END /etc/grub.d/35_fwupd ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###

### BEGIN /etc/grub.d/41_snapshots-btrfs ###
submenu 'Manjaro Linux snapshots' {
    configfile "${prefix}/grub-btrfs.cfg"
}
### END /etc/grub.d/41_snapshots-btrfs ###

### BEGIN /etc/grub.d/60_memtest86+ ###
if [ "${grub_platform}" == "pc" ]; then
    menuentry "Memory Tester (memtest86+)" --class memtest86 --class gnu --class tool {
        search --fs-uuid --no-floppy --set=root  4dd57ba2-0498-494e-aa48-191b52801fcf
        linux16 /timeshift-btrfs/snapshots/2022-10-15_23-44-29/@/boot/memtest86+/memtest.bin
    }
fi
### END /etc/grub.d/60_memtest86+ ###