|
Bugzilla – Full Text Bug Listing |
| Summary: | No snapshots in GRUB boot menu | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE Distribution | Reporter: | Ulrich Windl <Ulrich.Windl> |
| Component: | Bootloader | Assignee: | YaST Team <yast-internal> |
| Status: | RESOLVED FIXED | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P5 - None | CC: | aschnell, Ulrich.Windl |
| Version: | Leap 15.2 | ||
| Target Milestone: | --- | ||
| Hardware: | x86-64 | ||
| OS: | Other | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: | Trace output of /usr/lib/snapper/plugins/grub --refresh | ||
Hi Ulrich, Sorry for the late reply. Would you please attach the trace output of /usr/lib/snapper/plugins/grub --refresh ? bash -x /usr/lib/snapper/plugins/grub --refresh > grub-snapper-refresh.log 2>&1 Maybe the error caused some files not in place, like the /.snapshot is not mounted properly or snapshot's meta info is missing. Thanks. (In reply to Ulrich Windl from comment #0) > Maybe one of these cause it: > * Using secure boot The snapshot booting works with secure boot. > * Encrypting the PV of the system VG It should work. unless you configure separate /boot for less password typing. > * Using an NVME device It works with NVME device. Thanks. Created attachment 849382 [details] Trace output of /usr/lib/snapper/plugins/grub --refresh (In reply to Michael Chang from comment #1) > Sorry for the late reply. Would you please attach the trace output of > /usr/lib/snapper/plugins/grub --refresh ? The snapshots are definitely found: e.g.: + snapshot=/.snapshots/101/snapshot But still there are no snapshots in the boot menu. From the log some files appear to be missing. > '[' -r /.snapshots/124/info.xml -a -r /.snapshots/124/snapshot/boot/grub2/grub.cfg ']' Would you please help to check if the files exist ? FWIW you can use the command to list them. > find /.snapshots/*/info.xml /.snapshots/*/snapshot/boot/grub2/grub.cfg Thanks. (In reply to Michael Chang from comment #4) # find /.snapshots/*/info.xml /.snapshots/*/snapshot/boot/grub2/grub.cfg /.snapshots/101/info.xml /.snapshots/102/info.xml /.snapshots/106/info.xml /.snapshots/107/info.xml /.snapshots/111/info.xml /.snapshots/112/info.xml /.snapshots/122/info.xml /.snapshots/123/info.xml /.snapshots/124/info.xml /.snapshots/125/info.xml /.snapshots/126/info.xml /.snapshots/127/info.xml /.snapshots/128/info.xml /.snapshots/129/info.xml /.snapshots/130/info.xml /.snapshots/131/info.xml /.snapshots/1/info.xml /.snapshots/55/info.xml /.snapshots/56/info.xml /.snapshots/68/info.xml /.snapshots/69/info.xml find: ‘/.snapshots/*/snapshot/boot/grub2/grub.cfg’: No such file or directory (In reply to Ulrich Windl from comment #5) > (In reply to Michael Chang from comment #4) > find: ‘/.snapshots/*/snapshot/boot/grub2/grub.cfg’: No such file or directory The grub.cfg is missing in all snapshots so none is bootable, then it is understandable why no snapshot listed in boot menu. What is the content of your /.snapshots/*/snapshot/ ? Does it contain /.snapshots/*/snapshot/boot ? Do you use separate boot partition ? It would be great if you could help to provide more info about the error you ran into and your system in general ... Thanks. (In reply to Michael Chang from comment #6) > What is the content of your /.snapshots/*/snapshot/ ? Does it contain > /.snapshots/*/snapshot/boot ? Do you use separate boot partition ? It would > be great if you could help to provide more info about the error you ran into > and your system in general ... The snapshots contain a directory boot, but that is empty. I have a separate /boot LV (in addition to the root LV. (In reply to Ulrich Windl from comment #7) > (In reply to Michael Chang from comment #6) [snip] > The snapshots contain a directory boot, but that is empty. > I have a separate /boot LV (in addition to the root LV. The /boot has to be the same btrfs subvolume as the root (/) so the boot related files like kernel/initrd and grub.cfg can be snapshotted. If you use separate /boot then you lost these boot related data in snapshots and certainly no bootable snapshot listed in grub boot menu. AFAIR Yast insisted on having a separate /boot partition when installing. Despite of that having a /boot partition that is somewhat tradition. (In reply to Ulrich Windl from comment #9) > AFAIR Yast insisted on having a separate /boot partition when installing. > Despite of that having a /boot partition that is somewhat tradition. I think the purpose is to achieve one time password typing. Currently there's no solution to accomplish booting encrypted /boot with password typing less than two (once in bootloader, the other in initrd). Sorry I have set this as feature, if you don't like the default then you could go for the custom steps. Thanks. I wonder (considering that /boot typically has a very low change rate) whether a separate snapshot of /boot couldn't be done to be used to boot an older version. In many cases the old /boot is even more important than the old root. Despite of that I'm wondering about "/boot/efi type vfat": That's also a separate filesystem that isn't snapshot-ted. I'd wish thinks were as simple as: Configure snapshots for /boot, too in snapper, and everything else works automagically: # snapper -c boot create-config /boot # snapper list-configs Config | Subvolume -------+---------- boot | /boot root | / |
I don't know what causes it, but after having made a configuration error, I realized that GRUB's boot menu does not offer the boot from any snapshots. Maybe one of these cause it: * Using secure boot * Encrypting the PV of the system VG * Using an NVME device A /.snapshots/grub-snapshot.cfg exists, but the only entry basically is: submenu "Not found" { true; }