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,