Leap 42.3 boot error snapshot missing

On booting **Leap 42.3 **on /dev/sda2 (one of the two SSD installed) I get the following errors:

"error:file `/@/.snapshots/495/snapshot/boot/vmlinuz-4.4.180-102-default´ not found"
"You need to load the kernes first"

Before in Leap 15.1 on other SSD on /dev/sdc (with only ext4), in Yast snapper management , some snapshots on /dev/sda2 suddenly disappeared without me having done anything that could cause that. Sounds silly, probably is.

Anyways. On Leap 15.1 I mount the Leap 42.3 “/” to following mountpoint


mount /dev/sda2/ /mnt/leap423-root/

and then list subvolumes with


btrfs subvolume show /mnt/leap423-root/

I get the following output:


@/.snapshots/495/snapshot
        Name:                   snapshot
        UUID:                   ebfd3654-c59c-5f4b-a8b6-64f08caabee5
        Parent UUID:            fbf9f786-faf1-8e43-92c3-dd85dd4034e3
        Received UUID:          -
        Creation time:          2018-06-18 17:25:22 +0200
        Subvolume ID:           876
        Generation:             278431
        Gen at creation:        72667
        Parent ID:              258
        Top level ID:           258
        Flags:                  -
        Snapshot(s):
                                @/.snapshots/1002/snapshot
                                @/.snapshots/1003/snapshot
                                @/.snapshots/1032/snapshot
                                @/.snapshots/1033/snapshot
                                @/.snapshots/1034/snapshot
                                @/.snapshots/1087/snapshot
                                @/.snapshots/1088/snapshot
                                @/.snapshots/1089/snapshot
                                @/.snapshots/1090/snapshot
                                @/.snapshots/1091/snapshot
                                @/.snapshots/1092/snapshot
                                @/.snapshots/1093/snapshot
                                @/.snapshots/1094/snapshot
                                @/.snapshots/1095/snapshot
                                @/.snapshots/1096/snapshot


The snapshot referred to in the error message is not listet, supposedly deleted.

Anyboby has an idea,how I could fix the error?

Please run bootinfoscript (can be run from other instance, e.g. Leap 15.1) and post result to http://susepaste.org/. It will give some overview of your current bootloader configuration.

https://susepaste.org/11227462

please notice that there are two more HDD in the system that should not interfere with the boot process. They contain old opensuse systems. They are /dev/sdd/ and /dev/sdb/

So your primary system is openSUSE 15.1 on /dev/sdc2 booted via UEFI and you boot Leap 42.3 via 15.1 GRUB menu entry, correct?

yes, correct.

/@/.snapshots/495/snapshot is apparently your default root subvolume. What is the output of

btrfs subvolume get-default /mnt/leap423-root
ls -l /mnt/leap423-root/boot

this


mount /dev/sda2 /mnt/leap423-root/
btrfs subvolume get-default /mnt/leap423-root
ID 876 gen 278437 top level 258 path @/.snapshots/495/snapshot

and


ls -l /mnt/leap423-root/boot
insgesamt 55132
-rw-r--r-- 1 root root      512 26. Dez 2017  backup_mbr
-rw-r--r-- 1 root root     1725 12. Dez 2018  boot.readme
-rw-r--r-- 1 root root   180010 15. Mai 07:59 config-4.4.179-99-default
-rw-r--r-- 1 root root   180011 17. Jun 20:06 config-4.4.180-102-default
drwxr-xr-x 1 root root      140 19. Jun 16:43 grub2
lrwxrwxrwx 1 root root       26 19. Jun 16:40 initrd -> initrd-4.4.180-102-default
-rw------- 1 root root 10749156 19. Jun 16:41 initrd-4.4.179-99-default
-rw------- 1 root root 10746624 19. Jun 16:41 initrd-4.4.180-102-default
-rw-r--r-- 1 root root   502272 26. Dez 2017  message
-rw-r--r-- 1 root root   343191 15. Mai 08:20 symvers-4.4.179-99-default.gz
-rw-r--r-- 1 root root   343191 17. Jun 21:10 symvers-4.4.180-102-default.gz
-rw-r--r-- 1 root root      377 15. Mai 08:20 sysctl.conf-4.4.179-99-default
-rw-r--r-- 1 root root      377 17. Jun 21:10 sysctl.conf-4.4.180-102-default
-rw-r--r-- 1 root root  3304417 15. Mai 08:18 System.map-4.4.179-99-default
-rw-r--r-- 1 root root  3305662 17. Jun 20:54 System.map-4.4.180-102-default
-rw-r--r-- 1 root root  7140708 15. Mai 08:21 vmlinux-4.4.179-99-default.gz
-rw-r--r-- 1 root root  7152709 17. Jun 21:19 vmlinux-4.4.180-102-default.gz
lrwxrwxrwx 1 root root       27 19. Jun 16:40 vmlinuz -> vmlinuz-4.4.180-102-default
-rw-r--r-- 1 root root  6221496 15. Mai 08:44 vmlinuz-4.4.179-99-default
-rw-r--r-- 1 root root       65 15. Mai 08:44 .vmlinuz-4.4.179-99-default.hmac
-rw-r--r-- 1 root root  6233784 17. Jun 21:57 vmlinuz-4.4.180-102-default
-rw-r--r-- 1 root root       65 17. Jun 21:57 .vmlinuz-4.4.180-102-default.hmac

Could you show on Leap 15.1

grep -v '^#' /etc/default/grub
cat /boot/grub2/x86_64-efi/load.cfg
grep -v '^#' /etc/default/grub

GRUB_DISTRIBUTOR=
GRUB_DEFAULT=saved
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=8
GRUB_CMDLINE_LINUX_DEFAULT="splash=silent resume=/dev/disk/by-uuid/e22eab5c-4785-44b1-a5d7-12536bd9c97a mitigations=auto quiet"
GRUB_CMDLINE_LINUX=""

GRUB_TERMINAL="gfxterm"

GRUB_GFXMODE="auto"

GRUB_BACKGROUND=
GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt
SUSE_BTRFS_SNAPSHOT_BOOTING="true"
GRUB_USE_LINUXEFI="true"
GRUB_DISABLE_OS_PROBER="false"
GRUB_ENABLE_CRYPTODISK="n"
GRUB_CMDLINE_XEN_DEFAULT="vga=gfx-1024x768x16"

cat /boot/grub2/x86_64-efi/load.cfg
cat: /boot/grub2/x86_64-efi/load.cfg: Datei oder Verzeichnis nicht gefunden

…load.cfg file not found.

Do you use secure boot? Can you post output of “efibootmgr -v”?

AFAIK I use secure boot .


efibootmgr -v
BootCurrent: 0000
Timeout: 1 seconds
BootOrder: 0000,0005,0001,0002
Boot0000* opensuse-secureboot   HD(1,GPT,a86f94de-ef4e-4e3c-96d9-c0cdedefe456,0x800,0xfa000)/File(\EFI\OPENSUSE\SHIM.EFI)
Boot0001* Hard Drive    BBS(HD,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0200)..GO..NO..........S.a.m.s.u.n.g. .S.S.D. .8.5.0. .E.V.O. .M...2. .2.5.0.G.B...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L.3.S.C.3.X.N.J.0.2.A.8.4.1.3. .D. . . . ........BO..NO..........S.T.1.0.0.0.D.M.0.0.3.-.1.C.H.1.6.2...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L. . . . . . . . . . . . .1.S.E.D.0.2.E.M........BO..NO..........C.T.2.5.0.B.X.1.0.0.S.S.D.1...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L.5.1.2.4.0.F.E.0.C.B.7.5. . . . . . . . ........BO..NO..........S.A.M.S.U.N.G. .H.D.5.0.2.I.J...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L.1.S.T.3.D.J.Q.W.4.3.6.0.2.0. . . . . . ........BO
Boot0002* CD/DVD Drive  BBS(CDROM,,0x0)/VenHw(5ce8128b-2cec-40f0-8372-80640e3dc858,0300)..GO..NO..........T.S.S.T.c.o.r.p. .C.D.D.V.D.W. .S.H.-.2.2.4.D.B...................\.,.@.r.d.=.X..........A...........................>..Gd-.;.A..MQ..L.9.R.E.3.Y.6.F.B.0.B.2.1.R.R. . . . . . ........BO
Boot0005* opensuse      HD(1,GPT,a86f94de-ef4e-4e3c-96d9-c0cdedefe456,0x800,0xfa000)/File(\EFI\OPENSUSE\GRUBX64.EFI)..BO



OK, you should have /boot/efi/EFI/opensuse/grub.cfg. Could you post it?


set btrfs_relative_path="yes"
search --fs-uuid --set=root aa16966c-954a-437e-b35e-ec7ce171fe86
set prefix=(${root})/boot/grub2
source "${prefix}/grub.cfg"

Try deleting this line (you may want to make a backup copy of this file). Can you boot Leap 42 now?

Yeah, I could boot Leap42 now! And I’m back in Leap 15 too. Superb!

Is this a final solution or will I run into problems running future Updates on 15.1?

What caused the error in the first place? What went wrong? Did this solve the error or is it just to circumvent the error?

No, just the way to confirm my suspicion.

What caused the error in the first place?

GRUB is setup to resolve pathnames on btrfs relative to default subvolume, but os-prober generated pathnames relative to filesystem root. Deleting this line reverted GRUB to default behavior that matches grub.cfg content. As your Leap 15.1 is using ext4 as root, it is not affected by this change.

Try running “grub2-mkconfig -o /tmp/grub.cfg” and check generated file. Do you see the same paths starting with /@/ for Leap 42.3 or they look more “correct” now? If in doubt, upload to susepaste.

arvidjaar, thanks for still helping me with this problem!

output in case its interesting…

grub2-mkconfig -o /tmp/grub.cfg
GRUB-Konfigurationsdatei wird erstellt …
Thema gefunden: /boot/grub2/themes/openSUSE/theme.txt
Linux-Abbild gefunden: /boot/vmlinuz-4.12.14-lp151.28.16-default
initrd-Abbild gefunden: /boot/initrd-4.12.14-lp151.28.16-default
openSUSE Leap 42.3 auf /dev/sda2 gefunden
openSUSE 13.1 (Bottle) (x86_64) auf /dev/sdb1 gefunden
openSUSE 11.4 (x86_64) auf /dev/sdd2 gefunden
erledigt

and check generated file. Do you see the same paths starting with /@/ for Leap 42.3 or they look more “correct” now? If in doubt, upload to susepaste.

sorry, I cant see if it is more correct. Snappshots 179 and 180 appear in the grub.cfg file now. Same snapshots as listed in bootmenu when 42.3 didn’t boot. These snapshots are not the ones I found in

btrfs subvolume show

(see my post further up)

Here the /tmp/grub.cfg file:
https://susepaste.org/81103092

No, it is not. And I now know what happens. This is actually a bug in os-prober which ignores SUSE_BTRFS_SNAPSHOT_BOOTING if system is not on btrfs itself. If you would open bug report and post reference here I would add more technical explanation.

Workaround for you (as long as you do not use btrfs root for Leap 15.1) is to change SUSE_BTRFS_SNAPSHOT_BOOTING to “false” in /etc/default/grub and run “update-bootloader --reinit”. Then check /boot/efi/EFI/opensuse/grub.cfg that it does not contain line you deleted earlier. This should survive future Leap 15.1 updates.

Thank you, @arvidjaar. I changed snapshot booting to false and will see, if it works all right.

If you would open bug report and post reference here I would add more technical explanation.

I posted a bug report with id=1153953. If you want me to change anything on it please let me know.