Hi,
I had some difficulties this after afternoon with GRUB and my BTRFS filesystem. I explain my situation:
I wanted to restore a snapshot taken 5 days ago (taken the march 15th). I did it with Timeshift. So far, that’s ok.
Then i installed Pinta and a color picker and i took a new snapshot this afternoon.
The problem began when i rebooted my computer and checked if the new snapshot appears within grub menu.
I realized the new snapshot is not there whereas i updated grub with sudo update-grub
I had a look to both files /boot/grub/grub.cfg
and /boot/grub/grub-btrfs.cfg
/boot/grub/grub-btrfs.cfg
was OK, meaning the submenu section with the new snapshot is present.
/boot/grub/grub.cfg
was refering to the snapshot taken on march 15th, i mean instead of having
linux /@/boot/vmlinuz-5.15-x86_64 root=UUID=70853cef-788d-4beb-9c26-56f4fd32adc2 rw rootflags=subvol=@ quiet udev.log_priority=3
initrd /@/boot/intel-ucode.img /@/boot/initramfs-5.15-x86_64.img
i had
linux /run/timeshift/backup/timeshift-btrfs/snapshots/2022-03-15_21-11-35/@/boot/vmlinuz-5.15-x86_64 root=UUID=70853cef-788d-4beb-9c26-56f4fd32adc2 rw rootflags=subvol=@ quiet udev.log_priority=3
initrd /run/timeshift/backup/timeshift-btrfs/snapshots/2022-03-15_21-11-35/@/boot/intel-ucode.img /@/boot/initramfs-5.15-x86_64.img
It means that even if the file /boot/grub/grub-btrfs.cfg
was up to date, the one used by grub was not this one but the older one, from the snapshot taken 5 days ago, thus, without the new entry with the new snapshot.
So, i modified manually /boot/grub/grub.cfg
then sudo update-grub
but it does not change anything in my grub menu.
The only solution i found was to reboot my computer, press [E] to Edit the selection and made the modifications here to replace each occurence of
/run/timeshift/backup/timeshift-btrfs/snapshots/2022-03-15_21-11-35/@/
by
/@/
Then, right after boot, i updated grub, and now everything is fine.
This is weird to me that the only solution was to edit grub (not grub.cfg) but grub menu before my computer starts.
Do you know if another solution would have been possible ?
Many thanks