Timeshift Snapshot problem: message asking to restore all the time

Hello,

So I messed up my system trying to reinstall Nvidia Optimus Switch… but anyway… i booted in a Timeshift Snapshot from the GRUB menu, once booted I opened Timeshift, choosed the same snapshot I just booted in, ask it to be restored, and finally rebooted to the select the regular Endeavour boot entry (which is then supposed to be the restored snapshot).

Well, it seems like it worked, as my system was up and running again, BUT on each boot Timeshift launches and a popup appears:

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

So, the first time I (re)did as asked, but it was still there on next boot… I did restore that same snapshot a couple of times and the message and Timeshift opening on boot never goes away…

Do you know if it is normal behaviour? How to get rid of it then?
Or (more likely I guess) did I do something wrong?

Thanks a lot !!

Cheers!

You may have inadvertently started booting off the snapshot.

Can we see the contents of /etc/fstab and the output of findmnt /

1 Like

Hi
Thanks for the quick answer and sorry for the late reply…

$ 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=3E2E-7E6F                            /boot/efi      vfat    umask=0077 0 2
UUID=1c25bf5f-0d6c-498c-85b5-26d7194a8e12 /boot          ext4    defaults,noatime 0 2
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /              btrfs   subvol=/@,defaults,noatime,space_cache,autodefrag,compress=zstd 0 0
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /home          btrfs   subvol=/@home,defaults,noatime,space_cache,autodefrag,compress=zstd 0 0
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /var/cache/pacman/pkg          btrfs   subvol=@var-cache-pacman-pkg,defaults,noatime,space_cache,autodefrag,compress=zstd 0 0
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /var/cache     btrfs   subvol=/@cache,defaults,noatime,space_cache,autodefrag,compress=zstd 0 0
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /var/log       btrfs   subvol=/@log,defaults,noatime,space_cache,autodefrag,compress=zstd 0 0
tmpfs                                     /tmp           tmpfs   defaults,noatime,mode=1777 0 0
/dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20 /swap btrfs subvol=@swap,defaults,compress=no 0 0
/swap/swapfile none swap defaults 0 0
$ findmnt /
TARGET SOURCE                                                                                                  FSTYPE OPTIONS
/      /dev/mapper/luks-0bcbdeb4-5b6f-469d-aec1-24ee4fa1cf20[/timeshift-btrfs/snapshots/2021-12-17_09-00-01/@] btrfs  rw,noatime,compress=zst

:man_shrugging:

Yep, your machine has been booting off that snapshot. Probably since you restored it.

That can happen if grub-mkconfig runs while you are booted off a snapshot.

1 Like

your machine has been booting off that snapshot. Probably since you restored it.

Thanks a lot, do you know what should I do about it?

That can happen if grub-mkconfig runs while you are booted off a snapshot.

How could I prevent it if I have to restore a snapshot in the future?

Cheers!

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.

Make sure you don’t do anything except restore the snapshot and immediately reboot.

1 Like

I’m pretty sure what I did was:

  • booting “into” the snapshot from the grub menu
  • immediatly restored it
  • immediatly rebooted…
    :man_shrugging:

Will try…

Thank you so much for your help !

Will come back with the “result” :upside_down_face:

Cheers !

Do you have the grub-btrfs.path unit enabled?

1 Like

is it that ?

$ systemctl status grub-btrfs.path
○ grub-btrfs.path - Monitors for new timeshift snapshots
     Loaded: loaded (/etc/systemd/system/grub-btrfs.path; disabled; vendor preset: disabled)
     Active: inactive (dead)
   Triggers: ● grub-btrfs.service

If that is disabled, I am not sure how it happened.

Something must have triggered a grub-mkconfig while you were booted off the snapshot but going back in time to find it might be difficult at this point.

1 Like

I have no idea… could it be a that I messed up somehow configuring grub or something… I did follow this guide from the wiki when I did my install… I don’t know anything else :grimacing:

Yeah, did you do this step?

#13 – Limit the maximum amount of snapshots & update grub boot entries

Because if you combine that with grub-btrfs it will cause that problem.

1 Like

… I think I did do this step…

Shouldn’t have I ?

Not if you are using grub-btrfs

I would disable that service.

1 Like

I’m confused :confused:

I guess I am using grub-btrfs and I guess I also did do this step

#13 – Limit the maximum amount of snapshots & update grub boot entries

as to my understanding reading and following the wiki from step #9 both were “required” (I mean installing grub-btrfs and following step #13

So if I now get the right idea, it is instead either install and use grub-btrfs (step #12 in the wiki I guess), or (and NOT and) create the service as described in step #13, well, not BOTH ? (which I might have done then I guess…?)

I added a warning to the wiki.

1 Like

Well, many many thanks ! (especially for your time and patience… as usual!!)

I will try and do that asap

…and report back!

1 Like

What confused me (I mean, I wasn’t, I totally think both steps were “mandatory”) is that in step #9 we’re asked to install grub-btrfs and in step #12 we’re talking about grub-btrfs configuration and it is then stated:

I recommend leaving the configuration as is and to continue with step #13.

Thanks a lot for the clarification then !

Step 12 is just trying to say that you can configure it at this point but the author doesn’t recommend any special configuration beyond the default config.

1 Like

So, it is either grub-btrfs, either “custom” service from step 13, right ?

And if I want to get rid of grub-btrfs and use the service from step #13 now (on my actual system), I would just have to uninstall grub-btfrs and make sure the “custom” service is well implemented and that’s it? (and maybe just update grub and kernel?)

Btw, I think if one follows the Quick Copy Paste Version of that same Wiki, he might the end up with the same problem (a warning might want to be added at step #07 or smthg) I guess.

Cheers!