ultome
October 8, 2023, 12:30pm
#1
Hello,
I broke my Grub2 recently, and after a day managed to retore it (I had to do it the hard way in grub-rescue).
The problem is that booting from snapshots isn’t in the options anymore… I tried many things, among which:
Make sure have a “.snapshots” entry in /etc/fstab
;
Check out journalctl -b -p 0..4
;
Run mount -a
, and re-generate grub (make a random change in YaST Bootloader and save)
Check every box in YaST2 related to saving things in snapshots, so there should be many all over the place…
But unfortunately none of this helped. I also tried to correct all the red lines in journalctl -b -p 0..4
but I’m not very sure what I’m doing so I’m a little shy with this…
My problem probably has quite a simple solution, I just couldn’t find it online.
If you think you can help…
Thanks!
ultome
October 8, 2023, 4:07pm
#3
> snapper list
No permissions
> sudo snapper list
# | Type | Pre # | Date | User | Used Space | Cleanup | Description | Userdata
------+--------+-------+-----------------------------+------+------------+----------+-----------------------------------+--------------
0 | single | | | root | | | current |
484 | single | | jeu. 13 juil. 2023 04:32:08 | root | 316,00 KiB | | Avant la config de PAM pour howdy |
492 | single | | jeu. 13 juil. 2023 12:12:04 | root | 0 B | | Juste avant PAM |
568 | single | | mar. 18 juil. 2023 01:14:17 | root | 16,00 KiB | | Last time USB worked |
704 | single | | lun. 14 août 2023 04:42:05 | root | 342,42 MiB | | Howdy ok before 2000 updates |
709* | single | | lun. 14 août 2023 04:43:02 | root | 4,00 KiB | | writable copy of #696 |
905 | pre | | jeu. 28 sept. 2023 19:44:07 | root | 38,14 MiB | number | zypp(ruby.ruby3.2) | important=yes
906 | post | 905 | jeu. 28 sept. 2023 19:49:32 | root | 33,04 MiB | number | | important=yes
926 | pre | | dim. 01 oct. 2023 12:04:49 | root | 31,95 MiB | number | zypp(ruby.ruby3.2) | important=yes
927 | post | 926 | dim. 01 oct. 2023 12:06:35 | root | 2,38 MiB | number | | important=yes
967 | single | | lun. 02 oct. 2023 18:00:01 | root | 15,28 MiB | timeline | timeline |
977 | single | | mar. 03 oct. 2023 00:00:02 | root | 5,84 MiB | timeline | timeline |
988 | single | | mer. 04 oct. 2023 08:29:51 | root | 7,89 MiB | timeline | timeline |
1000 | single | | jeu. 05 oct. 2023 18:33:48 | root | 6,51 MiB | timeline | timeline |
1002 | pre | | jeu. 05 oct. 2023 18:46:00 | root | 0 B | number | zypp(ruby.ruby3.2) | important=yes
1003 | post | 1002 | jeu. 05 oct. 2023 18:50:13 | root | 560,00 KiB | number | | important=yes
1016 | single | | ven. 06 oct. 2023 10:33:25 | root | 0 B | timeline | timeline |
1021 | single | | ven. 06 oct. 2023 15:44:10 | root | 4,00 KiB | timeline | timeline |
1022 | single | | ven. 06 oct. 2023 16:00:01 | root | 0 B | timeline | timeline |
1027 | single | | ven. 06 oct. 2023 17:00:02 | root | 480,00 KiB | timeline | timeline |
1028 | single | | ven. 06 oct. 2023 20:10:17 | root | 1,49 MiB | timeline | timeline |
1033 | single | | ven. 06 oct. 2023 21:00:02 | root | 144,00 KiB | timeline | timeline |
1034 | single | | sam. 07 oct. 2023 13:52:18 | root | 4,00 KiB | timeline | timeline |
1035 | single | | sam. 07 oct. 2023 22:09:19 | root | 4,00 KiB | timeline | timeline |
1036 | pre | | sam. 07 oct. 2023 22:19:16 | root | 0 B | number | yast online_update |
1037 | pre | | sam. 07 oct. 2023 22:19:39 | root | 0 B | number | zypp(ruby.ruby3.2) | important=no
1038 | post | 1037 | sam. 07 oct. 2023 22:20:10 | root | 0 B | number | | important=no
1039 | post | 1036 | sam. 07 oct. 2023 22:20:15 | root | 0 B | number | |
1040 | single | | sam. 07 oct. 2023 23:00:01 | root | 416,00 KiB | timeline | timeline |
1045 | single | | dim. 08 oct. 2023 13:50:48 | root | 372,00 KiB | timeline | timeline |
1046 | single | | dim. 08 oct. 2023 14:00:01 | root | 0 B | timeline | timeline |
1047 | pre | | dim. 08 oct. 2023 14:00:36 | root | 0 B | number | yast online_update |
1048 | pre | | dim. 08 oct. 2023 14:14:48 | root | 0 B | number | yast bootloader |
1049 | post | 1047 | dim. 08 oct. 2023 14:17:08 | root | 0 B | number | |
1050 | post | 1048 | dim. 08 oct. 2023 14:17:41 | root | 0 B | number | |
1051 | pre | | dim. 08 oct. 2023 14:17:42 | root | 0 B | number | yast bootloader |
1052 | post | 1051 | dim. 08 oct. 2023 14:18:11 | root | 16,00 KiB | number | |
1053 | single | | dim. 08 oct. 2023 17:57:05 | root | 20,00 KiB | timeline | timeline |
1054 | single | | dim. 08 oct. 2023 18:00:02 | root | 4,00 KiB | timeline | timeline |
As I mentioned in my post, it used to work just fine, I really think I messed up with grub2 at some point last week…
Show full output of
grep -Ev '^$|^#' /etc/default/grub
ultome
October 8, 2023, 4:11pm
#5
> grep -Ev '^$|^#' /etc/default/grub
GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_CMDLINE_LINUX=""
GRUB_TERMINAL="gfxterm"
GRUB_GFXMODE=1920x1080
GRUB_GFXPAYLOAD_LINUX=keep
GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
GRUB_DISABLE_OS_PROBER="false"
You need
SUSE_BTRFS_SNAPSHOT_BOOTING="true"
to enable snapshot support in grub. After that you need to both reinstall grub2 and recreate grub.cfg.
update-bootloader --reinit
assuming that your bootloader is set correctly in the first place. Show
grep -Ev '$^|^#' /etc/sysconfig/bootloader
ultome
October 8, 2023, 5:33pm
#7
I’ve done the steps. I’ll keep you updated as soon as I can reboot (I’m working right now).
ultome
October 9, 2023, 8:41am
#8
Hello,
It did work. Thank you so much, now I have security and peace of mind again.
Cheers!