os-prober weird behaviour after first update: Can't find Windows / duplicated openSUSE entries

Hi guys,

I’ve recently installed openSUSE LEAP 15 in a ThinkPad X1 Carbon 6th Gen.
I’m currently facing some issues with os-prober.
**
The good:**

openSUSE LEAP 15 is dual booting with Windows 10 Pro.
UEFI / Secure Boot is enabled.
Windows Fast-Startup is disabled.

I’ve previously shrunk the NTFS partition with Windows. During setup I’ve reused Windows EFI System Partition, and went with a pretty standard partition scheme:

SAT-SUSE-X1C6G:~ # sudo parted -l
Model: NVMe Device (nvme)
Disk /dev/nvme0n1: 1024GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  274MB   273MB   fat32           EFI system partition          boot, hidden, esp
 2      274MB   290MB   16.8MB                  Microsoft reserved partition  msftres
 3      290MB   260GB   260GB   ntfs            Basic data partition          msftdata
 4      260GB   636GB   376GB   xfs
 5      765GB   980GB   215GB   btrfs
 6      980GB   1001GB  21.5GB  linux-swap(v1)                                swap
 7      1023GB  1024GB  1049MB  ntfs            Basic data partition          hidden, diag

Initially everything worked fine other than the fact that booting Windows through Grub required me to enter BitLocker Recovery Key (“fixed” by disabling BitLocker).
My partitions were also out of order and I fixed it with fdisk /dev/nvme0n1 (see https://superuser.com/a/1281466/231103 for the procedure that I’ve used).
At that point everything was fine.

The bad:

After installing initial openSUSE software updates the Windows Entry disappeared from Grub2.

SAT-SUSE-X1C6G:~ # snapper diff 3..4 /boot/grub2/grub.cfg
--- /.snapshots/3/snapshot/boot/grub2/grub.cfg  2018-06-11 20:43:41.012003098 +0100
+++ /.snapshots/4/snapshot/boot/grub2/grub.cfg  2018-06-11 21:03:31.251588932 +0100

### Unrelated stuff ###

@@ -190,16 +222,7 @@
 ### END /etc/grub.d/20_memtest86+ ###
 
 ### BEGIN /etc/grub.d/30_os-prober ###
-menuentry 'Windows Boot Manager (on /dev/nvme0n1p1)' --class windows --class os $menuentry_id_option 'osprober-efi-86F7-A0A7' {
-       insmod part_gpt
-       insmod fat
-       if  x$feature_platform_search_hint = xy ]; then
-         search --no-floppy --fs-uuid --set=root  86F7-A0A7
-       else
-         search --no-floppy --fs-uuid --set=root 86F7-A0A7
-       fi
-       chainloader /efi/Microsoft/Boot/bootmgfw.efi
-}
+
 ### END /etc/grub.d/30_os-prober ###
 
 ### BEGIN /etc/grub.d/40_custom ###

I can still boot Windows by pressing F12 during startup.

EFI looks fine:

SAT-SUSE-X1C6G:~ # efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001,0000,0018,0019,001A,001B,001C,001D,001E,001F,0024
Boot0000* Windows Boot Manager  HD(1,GPT,d674acc2-f6f1-4349-afbd-5e24566157e3,0x800,0x82000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}...B................
Boot0001* opensuse-secureboot   HD(1,GPT,d674acc2-f6f1-4349-afbd-5e24566157e3,0x800,0x82000)/File(\EFI\opensuse\shim.efi)
Boot0010  Setup FvFile(721c8b66-426c-4e86-8e99-3457c46ab0b9)
Boot0011  Boot Menu     FvFile(126a762d-5758-4fca-8531-201a7f57f850)
Boot0012  Diagnostic Splash Screen      FvFile(a7d8d9a6-6ab0-4aeb-ad9d-163e59a7a380)
Boot0013  Lenovo Diagnostics    FvFile(3f7e615b-0d45-4f80-88dc-26b234958560)
Boot0014  Regulatory Information        FvFile(478c92a0-2622-42b7-a65d-5894169e4d24)
Boot0015  Startup Interrupt Menu        FvFile(f46ee6f4-4785-43a3-923d-7f786c3c8479)
Boot0016  Rescue and Recovery   FvFile(665d3f60-ad3e-4cad-8e26-db46eee9f1b5)
Boot0017  MEBx Hot Key  FvFile(ac6fd56a-3d41-4efd-a1b9-870293811a28)
Boot0018* USB CD        VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,86701296aa5a7848b66cd49dd3ba6a55)
Boot0019* USB FDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,6ff015a28830b543a8b8641009461e49)
Boot001A* NVMe0 VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,001c199932d94c4eae9aa0b6e98eb8a400)
Boot001B* ATA HDD0      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f601)
Boot001C* USB HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,33e821aaaf33bc4789bd419f88c50803)
Boot001D* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)
Boot001E  Other CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a35406)
Boot001F  Other HDD     VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f606)
Boot0020* USBR BOOT CDROM       PciRoot(0x0)/Pci(0x14,0x0)/USB(11,1)
Boot0021* USBR BOOT Floppy      PciRoot(0x0)/Pci(0x14,0x0)/USB(11,0)
Boot0022* ATA HDD       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,91af625956449f41a7b91f4f892ab0f6)
Boot0023* ATAPI CD      VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,aea2090adfde214e8b3a5e471856a354)
Boot0024* PCI LAN       VenMsg(bc7838d2-0f82-4d60-8316-c068ee79d25b,78a84aaf2b2afc4ea79cf5cc8f3d3803)

And the uggly:

My workaround was to add sn entry to /etc/grub.d/40_custom:

SAT-SUSE-X1C6G:~ # cat /etc/grub.d/40_custom 
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

menuentry 'Windows 10' --class windows --class os {
        savedefault
        insmod part_gpt
        insmod fat
        search --no-floppy --fs-uuid --set=root  86F7-A0A7
        chainloader /efi/Microsoft/Boot/bootmgfw.efi
}

The funny thing is. Now os-prober is “detecting” and duplicating entries to my own openSUSE installation:

SAT-SUSE-X1C6G:~ # grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found theme: /boot/grub2/themes/openSUSE/theme.txt
Found linux image: /boot/vmlinuz-4.12.14-lp150.12.4-default
Found initrd image: /boot/initrd-4.12.14-lp150.12.4-default
Found linux image: /boot/vmlinuz-4.12.14-lp150.11-default
Found initrd image: /boot/initrd-4.12.14-lp150.11-default
Found openSUSE Leap 15.0 on /dev/nvme0n1p5
done

Diff /boot/grub2/grub.cfg using snapper:

SAT-SUSE-X1C6G:~ # snapper diff 114..115 /boot/grub2/grub.cfg 
--- /.snapshots/114/snapshot/boot/grub2/grub.cfg        2018-06-14 12:22:00.644020953 +0100
+++ /.snapshots/115/snapshot/boot/grub2/grub.cfg        2018-06-14 21:04:23.542363615 +0100
@@ -90,7 +90,7 @@
   load_video
   insmod gfxterm
   set locale_dir=$prefix/locale
-  set lang=en_US
+  set lang=POSIX
   insmod gettext
 fi
 terminal_output gfxterm
@@ -102,10 +102,10 @@
   search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
 fi
 insmod gfxmenu
-loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
+loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans10.pf2
 loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans12.pf2
-loadfont ($root)/boot/grub2/themes/openSUSE/DejaVuSans-Bold14.pf2
+loadfont ($root)/boot/grub2/themes/openSUSE/ascii.pf2
 insmod png
 set theme=($root)/boot/grub2/themes/openSUSE/theme.txt
 export theme
@@ -225,6 +225,75 @@
 ### END /etc/grub.d/20_memtest86+ ###
 
 ### BEGIN /etc/grub.d/30_os-prober ###
+menuentry 'openSUSE Leap 15.0 (on /dev/nvme0n1p5)' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+       insmod part_gpt
+       insmod btrfs
+       if  x$feature_platform_search_hint = xy ]; then
+         search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+       else
+         search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+       fi
+       linuxefi /boot/vmlinuz-4.12.14-lp150.12.4-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline} quiet resume=/dev/disk/by-id/scsi-eui.0025388c7103e93e-part7 splash=silent quiet showopts
+       initrdefi /boot/initrd-4.12.14-lp150.12.4-default
+}
+submenu 'Advanced options for openSUSE Leap 15.0 (on /dev/nvme0n1p5)' $menuentry_id_option 'osprober-gnulinux-advanced-e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+       menuentry 'openSUSE Leap 15.0 (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.12.4-default--e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+               insmod part_gpt
+               insmod btrfs
+               if  x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+               else
+                 search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+               fi
+               linuxefi /boot/vmlinuz-4.12.14-lp150.12.4-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline} quiet resume=/dev/disk/by-id/scsi-eui.0025388c7103e93e-part7 splash=silent quiet showopts
+               initrdefi /boot/initrd-4.12.14-lp150.12.4-default
+       }
+       menuentry 'openSUSE Leap 15.0, with Linux 4.12.14-lp150.12.4-default (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.12.4-default--e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+               insmod part_gpt
+               insmod btrfs
+               if  x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+               else
+                 search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+               fi
+               linuxefi /boot/vmlinuz-4.12.14-lp150.12.4-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline} quiet resume=/dev/disk/by-id/scsi-eui.0025388c7103e93e-part7 splash=silent quiet showopts
+               initrdefi /boot/initrd-4.12.14-lp150.12.4-default
+       }
+       menuentry 'openSUSE Leap 15.0, with Linux 4.12.14-lp150.12.4-default (recovery mode) (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.12.4-default--e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+               insmod part_gpt
+               insmod btrfs
+               if  x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+               else
+                 search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+               fi
+               linuxefi /boot/vmlinuz-4.12.14-lp150.12.4-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline}
+               initrdefi /boot/initrd-4.12.14-lp150.12.4-default
+       }
+       menuentry 'openSUSE Leap 15.0, with Linux 4.12.14-lp150.11-default (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.11-default--e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+               insmod part_gpt
+               insmod btrfs
+               if  x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+               else
+                 search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+               fi
+               linuxefi /boot/vmlinuz-4.12.14-lp150.11-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline} quiet resume=/dev/disk/by-id/scsi-eui.0025388c7103e93e-part7 splash=silent quiet showopts
+               initrdefi /boot/initrd-4.12.14-lp150.11-default
+       }
+       menuentry 'openSUSE Leap 15.0, with Linux 4.12.14-lp150.11-default (recovery mode) (on /dev/nvme0n1p5)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.12.14-lp150.11-default--e3233abc-bdd1-4215-b399-5b243d02cf5d' {
+               insmod part_gpt
+               insmod btrfs
+               if  x$feature_platform_search_hint = xy ]; then
+                 search --no-floppy --fs-uuid --set=root  e3233abc-bdd1-4215-b399-5b243d02cf5d
+               else
+                 search --no-floppy --fs-uuid --set=root e3233abc-bdd1-4215-b399-5b243d02cf5d
+               fi
+               linuxefi /boot/vmlinuz-4.12.14-lp150.11-default root=UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d ${extra_cmdline}
+               initrdefi /boot/initrd-4.12.14-lp150.11-default
+       }
+}
+
 ### END /etc/grub.d/30_os-prober ###
 
 ### BEGIN /etc/grub.d/40_custom ###

Output from os-prober:

SAT-SUSE-X1C6G:~ # os-prober 
/dev/nvme0n1p5:openSUSE Leap 15.0:openSUSE:linux:btrfs:UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d:subvol=@/.snapshots/1/snapshot

I’m aware that I can disable os-prober and live with my custom Windows 10 entry. Having said that, I’m concerned that something more fundamental may be broken in my system. plus I would also really like for os-prober to detect entries correctly just in case that I need to reinstall Windows in the future.

Can someone shed some light on:

  • Why os-prober is not detecting Windows 10?
  • Why it is detecting my running openSUSE LEAP system?

Is there a way to fix this?

Cheers,

First thing I would think of and try is booting from a Leap 15 image, wait until the installer / live system has loaded, hit Ctrl-Alt-F2 ( login as root ) then find out what your openSUSE root device is, I’ll call it /dev/sdX# where X is an alphabetic, # a number. Next do this


mount /dev/sdX# /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
yast


and start the bootloader module.

Thanks for the prompt response.
Do you want me to get something specific from yast bootloader UI? Or should I do something in specific?

No, just have a good look at the values, Move on, hit OK, and the bootloader will be reconfigured and rewriten. Then reboot and check whether it works like you expect. For your Windows: make sure that OS prober in the YaST module is checked.

Show output of

START=$(date +%s)
os-prober
journalctl --no-pager --since @$START

Now os-prober is “detecting” and duplicating entries to my own openSUSE installation:

And output of “cat /proc/mounts”

There is nothing is yast bootloader module that affects what os-prober does.

Hi guys,

Sorry for the long hiatus.
News:

  1. I’ve managed to prevent duplicated entries by adding
GRUB_OS_PROBER_SKIP_LIST="e3233abc-bdd1-4215-b399-5b243d02cf5d@/dev/nvme0n1p5"

to /etc/default/grub and running

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
  1. Yast bootloader module did nothing useful. After following steps similar to https://forums.opensuse.org/showthread.php/519699-Repair-Bootloader (including grub2-install) I’ve figured out that os-prober returns windows partition information, but only when booting from the Live USB. From a running system it only returns openSUSE Leap
  2. I also have a problem when booting Windows due to savedefault entry + btrfs file system (https://bugzilla.opensuse.org/show_bug.cgi?id=1031025). Is there a way to avoid the sparse file not allowed at boot, press any key message?

Requested output:

SAT-SUSE-X1C6G:~ # START=$(date +%s)                                                                                                                                                                                                                         
SAT-SUSE-X1C6G:~ # os-prober                                                                                                                                                                                                                                 
/dev/nvme0n1p5:openSUSE Leap 15.0:openSUSE:linux:btrfs:UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d:subvol=@/.snapshots/1/snapshot                                                                                                                              
SAT-SUSE-X1C6G:~ # journalctl --no-pager --since @$START                                                                                                                                                                                                     
-- Logs begin at Sun 2018-06-17 20:15:50 BST, end at Sun 2018-06-17 20:38:54 BST. --                                                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19442]: debug: /sys/block/nvme0n1/nvme0n1p1: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19444]: debug: /sys/block/nvme0n1/nvme0n1p2: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19446]: debug: /sys/block/nvme0n1/nvme0n1p3: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19448]: debug: /sys/block/nvme0n1/nvme0n1p4: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19450]: debug: /sys/block/nvme0n1/nvme0n1p5: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19452]: debug: /sys/block/nvme0n1/nvme0n1p6: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19454]: debug: /sys/block/nvme0n1/nvme0n1p7: part of multipath disk nvme0n1                                                                                                                                         
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19479]: debug: btrfs volume uuid=e3233abc-bdd1-4215-b399-5b243d02cf5d partition=/dev/nvme0n1p5                                                                                                                      
Jun 17 20:38:53 SAT-SUSE-X1C6G os-prober[19480]: debug: running /usr/lib/os-probes/50mounted-tests on btrfs /dev/nvme0n1p5                                                                                                                                   
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19483]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d                                                                                                                                
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19485]: debug: btrfs volume e3233abc-bdd1-4215-b399-5b243d02cf5d mounted                                                                                                                                      
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19508]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:53 SAT-SUSE-X1C6G 90linux-distro[19523]: result: /dev/nvme0n1p5:openSUSE Leap 15.0:openSUSE:linux:btrfs:UUID=e3233abc-bdd1-4215-b399-5b243d02cf5d:subvol=@/.snapshots/1/snapshot
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19524]: debug: os found by subtest /usr/lib/os-probes/mounted/90linux-distro on subvol @/.snapshots/1/snapshot
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19532]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19539]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:53 SAT-SUSE-X1C6G 50mounted-tests[19549]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/var
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19556]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19566]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/usr/local
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19573]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19583]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/tmp
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19590]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19600]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/srv
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19607]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19617]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/root
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19624]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19634]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/opt
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19641]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19651]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/boot/grub2/x86_64-efi
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19658]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19668]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/boot/grub2/i386-pc
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19675]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19685]: debug: begin btrfs processing for e3233abc-bdd1-4215-b399-5b243d02cf5d subvol=@/.snapshots
Jun 17 20:38:54 SAT-SUSE-X1C6G 50mounted-tests[19692]: debug: running subtest /usr/lib/os-probes/mounted/90linux-distro
Jun 17 20:38:54 SAT-SUSE-X1C6G os-prober[19731]: debug: os detected by /usr/lib/os-probes/50mounted-tests
SAT-SUSE-X1C6G:~ # cat /proc/mounts
sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0
devtmpfs /dev devtmpfs rw,nosuid,size=8071464k,nr_inodes=2017866,mode=755 0 0
securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0
tmpfs /dev/shm tmpfs rw,nosuid,nodev 0 0
devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000 0 0
tmpfs /run tmpfs rw,nosuid,nodev,mode=755 0 0
tmpfs /sys/fs/cgroup tmpfs ro,nosuid,nodev,noexec,mode=755 0 0
cgroup /sys/fs/cgroup/unified cgroup2 rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/systemd cgroup rw,nosuid,nodev,noexec,relatime,xattr,name=systemd 0 0
pstore /sys/fs/pstore pstore rw,nosuid,nodev,noexec,relatime 0 0
efivarfs /sys/firmware/efi/efivars efivarfs rw,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup/blkio cgroup rw,nosuid,nodev,noexec,relatime,blkio 0 0
cgroup /sys/fs/cgroup/pids cgroup rw,nosuid,nodev,noexec,relatime,pids 0 0
cgroup /sys/fs/cgroup/memory cgroup rw,nosuid,nodev,noexec,relatime,memory 0 0
cgroup /sys/fs/cgroup/devices cgroup rw,nosuid,nodev,noexec,relatime,devices 0 0
cgroup /sys/fs/cgroup/cpuset cgroup rw,nosuid,nodev,noexec,relatime,cpuset 0 0
cgroup /sys/fs/cgroup/freezer cgroup rw,nosuid,nodev,noexec,relatime,freezer 0 0
cgroup /sys/fs/cgroup/rdma cgroup rw,nosuid,nodev,noexec,relatime,rdma 0 0
cgroup /sys/fs/cgroup/hugetlb cgroup rw,nosuid,nodev,noexec,relatime,hugetlb 0 0
cgroup /sys/fs/cgroup/net_cls,net_prio cgroup rw,nosuid,nodev,noexec,relatime,net_cls,net_prio 0 0
cgroup /sys/fs/cgroup/perf_event cgroup rw,nosuid,nodev,noexec,relatime,perf_event 0 0
cgroup /sys/fs/cgroup/cpu,cpuacct cgroup rw,nosuid,nodev,noexec,relatime,cpu,cpuacct 0 0
/dev/mapper/eui.0025388c7103e93e-part5 / btrfs rw,relatime,ssd,space_cache,subvolid=267,subvol=/@/.snapshots/1/snapshot 0 0
systemd-1 /proc/sys/fs/binfmt_misc autofs rw,relatime,fd=39,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=14918 0 0
hugetlbfs /dev/hugepages hugetlbfs rw,relatime,pagesize=2M 0 0
mqueue /dev/mqueue mqueue rw,relatime 0 0
debugfs /sys/kernel/debug debugfs rw,relatime 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /boot/grub2/x86_64-efi btrfs rw,relatime,ssd,space_cache,subvolid=264,subvol=/@/boot/grub2/x86_64-efi 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /srv btrfs rw,relatime,ssd,space_cache,subvolid=261,subvol=/@/srv 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /var btrfs rw,relatime,ssd,space_cache,subvolid=258,subvol=/@/var 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /root btrfs rw,relatime,ssd,space_cache,subvolid=262,subvol=/@/root 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /tmp btrfs rw,relatime,ssd,space_cache,subvolid=260,subvol=/@/tmp 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /.snapshots btrfs rw,relatime,ssd,space_cache,subvolid=266,subvol=/@/.snapshots 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /boot/grub2/i386-pc btrfs rw,relatime,ssd,space_cache,subvolid=265,subvol=/@/boot/grub2/i386-pc 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /usr/local btrfs rw,relatime,ssd,space_cache,subvolid=259,subvol=/@/usr/local 0 0
/dev/mapper/eui.0025388c7103e93e-part5 /opt btrfs rw,relatime,ssd,space_cache,subvolid=263,subvol=/@/opt 0 0
/dev/mapper/eui.0025388c7103e93e-part1 /boot/efi vfat rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro 0 0
fusectl /sys/fs/fuse/connections fusectl rw,relatime 0 0
/dev/mapper/eui.0025388c7103e93e-part4 /home xfs rw,relatime,attr2,inode64,noquota 0 0
/dev/mapper/eui.0025388c7103e93e-part3 /mnt/windows fuseblk rw,nosuid,nodev,noexec,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096 0 0
binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
tmpfs /run/user/1001 tmpfs rw,nosuid,nodev,relatime,size=1616588k,mode=700,uid=1001,gid=100 0 0
jetbrains-toolbox /tmp/.mount_jetbraM01HWa fuse.jetbrains-toolbox ro,nosuid,nodev,relatime,user_id=1001,group_id=100 0 0
tracefs /sys/kernel/debug/tracing tracefs rw,relatime 0 0
gvfsd-fuse /run/user/1001/gvfs fuse.gvfsd-fuse rw,nosuid,nodev,relatime,user_id=1001,group_id=100 0 0

Actually, AFAIK I did not install LVM.

SAT-SUSE-X1C6G:~ # lvdisplay 
SAT-SUSE-X1C6G:~ # vgdisplay 
SAT-SUSE-X1C6G:~ # pvdisplay 

Should I have /dev/mapper? /dev/mapper/eui.0025388c7103e93e* and /dev/nvme0n1p5* are sharing UUIDs. The system in mounting the former while os-prober is detecting the latter.

SAT-SUSE-X1C6G:~ # ls /dev/mapper/
control  eui.0025388c7103e93e  eui.0025388c7103e93e-part1  eui.0025388c7103e93e-part2  eui.0025388c7103e93e-part3  eui.0025388c7103e93e-part4  eui.0025388c7103e93e-part5  eui.0025388c7103e93e-part6  eui.0025388c7103e93e-part7

SAT-SUSE-X1C6G:~ # blkid /dev/mapper/eui.0025388c7103e93e
/dev/mapper/eui.0025388c7103e93e: PTUUID="0909370f-c203-46a2-b6ed-950f29f7495c" PTTYPE="gpt"
SAT-SUSE-X1C6G:~ # blkid /dev/nvme0n1
/dev/nvme0n1: PTUUID="0909370f-c203-46a2-b6ed-950f29f7495c" PTTYPE="gpt"

SAT-SUSE-X1C6G:~ # blkid /dev/mapper/eui.0025388c7103e93e-part5
/dev/mapper/eui.0025388c7103e93e-part5:  UUID="e3233abc-bdd1-4215-b399-5b243d02cf5d"  UUID_SUB="e1def8d2-6587-400b-b463-80dbd34ad53f" TYPE="btrfs"  PARTUUID="8778a18c-ac36-4289-8e18-9d6dcea1cee3"
SAT-SUSE-X1C6G:~ # blkid /dev/nvme0n1p5 
/dev/nvme0n1p5: UUID="e3233abc-bdd1-4215-b399-5b243d02cf5d" UUID_SUB="e1def8d2-6587-400b-b463-80dbd34ad53f" TYPE="btrfs" PARTUUID="8778a18c-ac36-4289-8e18-9d6dcea1cee3"

It looks to me that you may be running into this problem:

Bug 1097203 - On a multiboot system the openSUSE Leap 15 os-prober does not detect any other installed OS because multipath is enabled after installation on a btrfs partition.

I think you hit the nail on the head. Is there a way to disable multipath and rebuild the init ramdisk without breaking my system?

I have zero experience with multipath. So I would only be guessing.

As long as actual device-mapper names are not hardcoded (i.e. fstab, command line etc are using UUID, LABEL or any other self-identifying properties), you could try booting with multipath=off. If it works, running mkinitrd should hopefully result in initrd without multipath. Otherwise booting Live with the same option, chrooting and running mkinitrd should do it either.

I ended up following SLES-12 guide to disable multipath (https://www.suse.com/documentation/sles-12/stor_admin/data/sec_multipath_config.html):

sudo systemctl stop multipathd
sudo systemctl disable multipathd
sudo dracut --force -o multipath

This fixes both os-prober issues (it now detects Windows and do not duplicate openSUSE entries). Thanks!

Still, two issues are still affecting me:

  1. Boot is now taking ages. It used to be much faster before disabling multipath. Any clues? May something is hanging during boot until timeout?
  2. I’m still facing the Error: sparse file not allowed at boot (https://bugzilla.opensuse.org/show_bug.cgi?id=1031025). Not booting straight to the last system is annoying, specially during upgrades. But the error message and having to press enter every boot is also very annoying. Are there any known workarounds?

Ok, found the reason for the slow boot. There was a lingering referenced to scsi-eui.0025388c7103e93e-part7 set as the swap partition.

Fix: Edit /etc/default/grub and get the swap partition by id. In my specific case I’ve changed

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=/dev/disk/by-id/scsi-eui.0025388c7103e93e-part7 splash=silent acpi.ec_no_wakeup=1 showopts"

to

GRUB_CMDLINE_LINUX_DEFAULT="quiet resume=/dev/disk/by-uuid/dcfda8b8-8810-4ec8-8b0a-ad70daaf0c2f splash=silent acpi.ec_no_wakeup=1 showopts"

And executed:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg
sudo mkinitrd

Boot time was about 1m41s, now it is back to ~9s. Not bad.

Now my only remaining problem is the “sparse file not allowed at boot” error message (https://bugzilla.opensuse.org/show_bug.cgi?id=1031025). Any known fixes / workarounds other than disabling

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT="true"

?

I really want to be able to boot my last selected OS without a scary error message.

Ok, having a look at https://forums.opensuse.org/showthread.php/523940-error-sparse-file-not-allowed-at-boot, it looks like this is a pretty well known bug; It may be my impression but apparently the error message with the 10 seconds timeout was never fixed (https://bugzilla.opensuse.org/show_bug.cgi?id=1031025). Not sure if it is a limitation or if the prompt was kept on purpose. Do you guys think that it’s worth to reopen this bug?

For now I went with rEFInd to select between openSUSE and Windows. A few tweaks later and voila!

https://i.imgur.com/f2JC6yp.jpg

If you are wondering about the penguin icon, grub is still around just so that I can easily boot to old snapshots.

Since rEFId is now the main boot manager, and since it will save the last selected entry already, I’ve changed /etc/default/grub not to save entries:

GRUB_DEFAULT=0
GRUB_SAVEDEFAULT="false"

Hopefully this thread will help other people.

Cheers,