The case of kernels dissapearing from GRUB after deleting some timeshift snapshots

this time over the app garuda assistent there btrfs and then start full balance .. normaly i make

sudo btrfs balance start /

on a second terminal u can check the status of it with

sudo btrfs balance status /

Probably yes. Timeshift could be messing with this:

Since the top-level subvolume is mounted, the system could be accessing this after opening Timeshift.

One idea is to compare the output of mount | grep btrfs of both the times, while seeing "@"s and while not seeing.

I'm trying to temporarily fix my broken PC and if I succeed I'll also check it.

2 Likes

without @

mount | grep btrfs
/dev/nvme0n1p2 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=2291,subvol=/@)
/dev/nvme0n1p2 on /home type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=257,subvol=
/@home)
/dev/nvme0n1p2 on /srv type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=259,subvol=/
@srv)
/dev/nvme0n1p2 on /root type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=258,subvol=
/@root)
/dev/nvme0n1p2 on /var/cache type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=260,su
bvol=/@cache)
/dev/nvme0n1p2 on /var/log type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=261,subv
ol=/@log)
/dev/nvme0n1p2 on /var/tmp type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=262,subv
ol=/@tmp)

with the @

mount | grep btrfs
/dev/nvme0n1p2 on / type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=2291,subvol=/@)
/dev/nvme0n1p2 on /home type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=257,subvol=
/@home)
/dev/nvme0n1p2 on /srv type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=259,subvol=/
@srv)
/dev/nvme0n1p2 on /root type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=258,subvol=
/@root)
/dev/nvme0n1p2 on /var/cache type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=260,su
bvol=/@cache)
/dev/nvme0n1p2 on /var/log type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=261,subv
ol=/@log)
/dev/nvme0n1p2 on /var/tmp type btrfs (rw,noatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=262,subv
ol=/@tmp)
/dev/nvme0n1p2 on /run/timeshift/backup type btrfs (rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,sub
volid=5,subvol=/)

so the difference as i see is the last line

/dev/nvme0n1p2 on /run/timeshift/backup type btrfs (rw,relatime,compress=zstd:3,ssd,space_cache,autodefrag,subvolid=5,subvol=/)

edit : Thx @SameExpert for u time

so after u explain and the test i think its a normal behavor bec of top-level subvolume is mounted then . and after a reboot its all normal .
so i think at the treadstarter was something different .
maybee if snapshot is corrupt then it will allways show
but i also think after closing the app it should unmount the top-level subvolume that its not show the @

1 Like

i fixed my PC somehow (from different problem), updated everything to the latest, booted into it now and checked it.

Yes, Timeshift is creating this, but I'm still not seeing the "@"s on opening the file manager (yes, I can manually go to the /run/timeshift/backup dir).

Dolphin

My question, the file manager should either show the $HOME or the last opened location on its launch. How do you people are seeing the "@"s? You should have either opened the backup folder, or changed the default location? :thinking:

1 Like

if open dolphin i get the home folder .
on the side if i cklick on my hdd it open normaly / but if with @ then its open /run/timeshift/backup/ instead of /

Hm now got it. I never faced it because I hid this left shortcut you are using:

Now I confirm this.

To prevent this:

sudo btrfs subvolume set-default /

(I suggest to also check the result after rebooting)

I did this a while ago, and a folder called timeshift-btrfs got created in /@/, Timeshift refused to take and to show the snapshots. But this was a while before, now probably this shouldn't happen, since Timeshift mounts the / subvol in /run/timeshift/backup every time.

3 Likes

now it not shows any snapshots and the timeshift app says its no system drive

1 Like

OK, no need to worry. This worked for me.

Solution:

  1. sudo btrfs subvolume set-default /
  2. Open the hard disk shortcut in Dolphin.
  3. sudo btrfs subvolume set-default 5 /

That's all. I rebooted and checked again, now no "@"s anymore.. Don't know if the problem occurs again or not, but as for now it's fine.

Edit: It seems this is something related to Dolphin only. Users of other DE, if possible, please check if you have the same problem or not.

Edit2: After opening Timeshift I again see "@"s, so this workaround is temporary, not permanent..."

5 Likes

Thank You . thats worked

1 Like

Sorry for the late answer, I had to be AFK for several hours after posting this thread. Thank you for all the answers, and for sharing your expertise. I feel humbled.

Since I just did a reinstall, my system is working now. But I can confirm that in a similar fashion as @smoky , I just created a snapshot for testing and the @'s are here again. I can confirm that
Dolphin displays in the location bar : '/run/timeshift/backup/'.

If I reboot (without making changes to the system or deleting snapshots), everything returns to normal.

In order to not spam this fine forum, as an answer for my outputs, I'd like to say that they are really similar to @smoky's. I read the thread and did all the troubleshooting kindly issued by @SameExpert and the results were, again, all similar to @smoky's.

Maybe it's just Dolphin, but we don't know if other programs are also wrongly taking root as '/run/timeshift/backup/' while the @'s are there and maybe that was my case.

I can remember now the steps I did to get into system breakdown:

  • Run a full system update >> The system update creates a snapshot and the @'s start to show up.

  • The system update partially completes 'can't write to disk' (out of space).

  • I delete some snapshots to regain some disk space.

  • Run the system update again >> It completes the remainder of the job.

  • Concerned about disk space, I delete more snapshots.

  • Restart the system >> Garuda is gone now from GRUB along with the ZEN and LTS options.

  • I try to boot into one of the remaining snapshots >> 'You need to load the kernel first'.

  • I chroot from live USB and follow instructions featured in this forum >> I can't remember the exact terminal output, but while following instructions, GRUB could never find or create the Garuda entry.

  • The deadline for the client's project is getting dangerously near >> I decide to just reinstall Garuda and investigate the issue as a learning/being-safe opportunity after the project is finished and deployed.

My partial 'solution' would be:

  • Be aware of automatic snapshots (full system update creates one) and immediately restart after one is created to restore things to normal.

  • Before deleting snapshots to save space, or before messing with root in any way, check with Dolphin if the @'s are there. If they are, restart and return to normal before doing anything.

  • You can never know if Dolphin is the only program that is taking root for '/run/timeshift/backup/' so better be on the safe side.

  • Raise an issue in the Timeshift repo, and see the author's input (right now, there are 128 open, I'll wait).

Thanks for everything. I tried Manjaro first because it was the most popular at the time but Garuda is miles ahead as the best Arch based Linux distro.

I deeply confused by this topic. :woozy_face:

/run/timeshift/backup is dynamically mounted by Timeshift. It mounts the default subvolume which, in most cases, will be the root of the partition aka subvolid=5. Since Garuda uses a flat subvol layout, that basically contains all the subvolumes. In Garuda, the default subvolume names start with @.

In summary, when timeshift is running, /run/timeshift/backup is supposed to contain a bunch of subvolumes that start with @.

If that is what you are seeing, it is normal and expected. If you are seeing something different can you explain it in more detail and/or with screenshots?

EDIT: Just to be clear, I am not asking you to explain the whole situation in more detail. Just the part about the @'s and where they are showing up.

1 Like

OK, perhaps I figured it out.

Are you referring to this?

If so, that isn't the root of the filesystem, it is showing you the root of the device. That device has an unfortunate name of "root" by default

Disk /dev/sda: 85.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number  Start   End     Size    File system  Name  Flags
1      2097kB  275MB   273MB   fat32              boot, esp
2      275MB   85.9GB  85.6GB  btrfs        root

Since the device named "root" contains a btrfs filesystem, dolphin shows use the root of the partition if it is mounted. If not, it is showing you the @ subvolume.

Timeshift dynamically mounts the root of the partition when it runs which causes the device named "root" to start showing you the root of the btrfs partition.

The same thing will happen if you manually mount the root of the filesystem.

Although I admit that functionality is perhaps not intuitive, it is normal and expected.

5 Likes

Hello @dalto, thanks for the input.

The @'s show up in Dolphin after creating a snapshot. In the left side, if you click on your system drive, the path '/run/timeshift/backup/' is shown instead of '/' which I assume would be expected behaviour.

That explains a lot! Thank you @dalto !

But if this is normal... How could I brake the system while this was mounted? Just to be on the safe side. :slight_smile:

I don't know what you did to break your system, exactly, but I suspect it had nothing to do with those @ directories showing up.

It is hard to troubleshoot after the fact since you already re-installed.

1 Like

Then I'll be extra careful next time. I'm marking your answer as solution. You rock @dalto .

Thank you.

1 Like

I faced this few weeks ago and without restarting I manually deleted some snapshots which were giving error and some I deleted through timeshift. Then I created a snapshot and restarted pc and everything worked expect I hadn't run grub-update to show snapshots entries
Yes I used these @ mounts to find and delete snapshots
Safe to assume that alone didn't kill ur pc I guess

I am not sure that is really a good idea. Timeshift will break if it happens to try to mount your btrfs partition in the middle of that. Also, it is work around for something that isn't broken to begin with.

Why set the default volume to @ and then open dolphin and set the default back to the root afterwards? You are doing that to try to make the device show you the contents of @? What is the purpose of that?

If you want dolphin to have an easy way to access the root of your filesystem you can just add it to places as I did in my screenshot above.

1 Like

Well, seeing the "@" is not at all an issue actually, except that it may confuse users, because this unexpected behavior was not there.before, something got changed after an update.

Instead of opening / Dolphin is opening /run/timeshift/backup. Even though this is not actually problem, Dolphin should not go to /run/timeshift/backup instead it should go to / by default.

Some problem may arise for newbies, for example, if they try to open a recently opened file in Kate and if it says "The file "/run/timeshift/backup/..." could not be found", etc.

The above workaround is to stop Dolphin openning the backup folder as root. Also, after setting the top-level subvolume back to default, Timeshift should working again.

1 Like

Isn't the opposite, wouldn't it make more sense for it to always point to the root of the partition? Why does it show the contents of @ in the first place?

1 Like