I finally got around to upgrading the OS on my HP Elitebook 8470P from LEAP 42.1 to 42.2 using a DVD which I verified on that machine. When I got done, there was no longer a menu item in grub2 to boot Windows 10. Rather than wasting a lot of time trying to figure out why, I just went ahead and upgraded that OS to LEAP 42.3. Same problem.
I confirmed that os-prober was enabled in /etc/default/grub and issued the command
# grub2-mkconfig
from a root prompt. When I looked at /boot/grub2/grub.cfg, there was no entry between BEGIN and END for 30_os-prober. I couldn’t find any usage docs for os-prober, so I tried
# os-prober 2&1> somefile
and saw that somefile had a size of zero.
So I grabbed the entry for 30_os-prober from the grub.cfg file from my 42.1 backup and inserted that entry into /boot/grub2/grub.cfg. When I tried booting from the menu entry for Windows, I got
error: invalid signature
press any key ...
So I tried editing the chainload command to add the --force option. The screen went blank for a few seconds and then rebooted.
Here is the os-prober entry I added to /boot/grubs/grub.cfg
### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-7EB1-87B3' {
savedefault
insmod part_gpt
insmod fat
set root='hd0,gpt1'
if x$feature_platform_search_hint = xy ]; then
search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1 7EB1-87B3
else
search --no-floppy --fs-uuid --set=root 7EB1-87B3
fi
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/30_os-prober ###
I have confirmed that all of the files in the EFI System partition (partition #1) are exactly the same as the files in my 42.1 backup. IIRC, I had to copy some files from EFI/Boot/opensuse in the EFI System partition to EFI/Boot and rename one of them (I think it was grubx64.efi) to bootx64.efi after the 42.1 install in order to get grub2 to load instead of Windows.
But how do I fix this now? I feel like I’m running out of options.
This machine has Secure Boot disabled and is set to boot in UEFI with CSM mode. Even though it’s only a 500GB drive, it is configured as GPT and the partitioning looks like
# fdisk -l /dev/sda
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: F760F8C6-BCB8-11E5-8121-806E6F6E6963
Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 468991 262144 128M Microsoft reserved
/dev/sda3 468992 2566143 2097152 1G Linux filesystem
/dev/sda4 2566144 556687359 554121216 264.2G Linux LVM
/dev/sda5 556687360 567173119 10485760 5G Microsoft basic data
/dev/sda6 567173120 973232428 406059309 193.6G Microsoft basic data
/dev/sda7 973234176 976773119 3538944 1.7G Windows recovery environment
Partition #3 is mounted at /boot, and the rest of the openSuSE filesystems are in the LVM partition at #4. Windows is located in Partition #6
I have noticed that there are some size differences between the files in EFI/Boot and EFI/opensuse
# ls -l /boot/efi/EFI/Boot/
total 2152
-rwxrwxr-x 1 root root 1155520 May 15 11:51 bootx64.efi
-rwxrwxr-x 1 root root 71672 May 15 11:51 fallback.efi
-rwxrwxr-x 1 root root 150 Jan 23 2016 grub.cfg
-rwxrwxr-x 1 root root 973944 Jan 23 2016 grub.efi
# ls -l /boot/efi/EFI/opensuse/
total 3338
-rwxrwxr-x 1 root root 58 May 15 11:51 boot.csv
-rwxrwxr-x 1 root root 141 May 15 11:51 grub.cfg
-rwxrwxr-x 1 root root 977784 May 15 11:51 grub.efi
-rwxrwxr-x 1 root root 121344 May 15 11:51 grubx64.efi
-rwxrwxr-x 1 root root 1159776 May 15 11:51 MokManager.efi
-rwxrwxr-x 1 root root 1155520 May 15 11:51 shim.efi
Could that be my problem? do I have to manually copy the grub2 files to EFI/Boot again? If that’s the case, why did booting continue to work correctly in 42.1 when all of the files pre- and post- install compare correctly?
I would very much appreciated any guidance you folks can provide.
ron