I recently decided to install OpenSuse Leap 15.4 alongside Windows. During install I made sure that the EFI partition was to be mounted as /boot/efi but when I start my computer Windows doesn’t appear in GRUB.
I tried running os-prober as root and it returns nothing, not even my OpenSuse install.
/boot/efi/EFI contains the following folders
Boot, Manjaro, Microsoft, ubuntu (I’m assuming Manjaro and ubuntu are from previous Linux installs)
fdisk-l gives the following for my SSD where my OSs are installed.
Disk /dev/sdb: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: JAJS600M512C
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A18D95E8-A535-4A0E-9C3C-D924DF33BC39
Device Start End Sectors Size Type
/dev/sdb1 34 262177 262144 128M Microsoft reserved
/dev/sdb2 264192 468991 204800 100M EFI System
/dev/sdb3 468992 585298157 584829166 278.9G Microsoft basic data
/dev/sdb4 585299968 586405887 1105920 540M Windows recovery environment
/dev/sdb5 586405888 590600191 4194304 2G Linux swap
/dev/sdb6 625469440 625485823 16384 8M BIOS boot
/dev/sdb7 625485824 771368959 145883136 69.6G Linux filesystem
/dev/sdb8 771368960 1000215182 228846223 109.1G Linux filesystem
Looking in YasT Partitioner sdb2 is indeed mounted at /boot/efi
Could the issue be that the ‘efi’ folder contains a further ‘EFI’ subfolder?
Has anyone got any ideas on how I can sort this out? I would really rather not reinstall. I’ve already had to do that once to try and see if mounting sdb2 as /boot/efi would cause Windows to appear.
Apparently you installed openSUSE for legacy BIOS boot. You need to reinstall making sure you boot installer in EFI mode.
If you are adventurous, you can also switch to using EFI bootloader without reinstallation, but this is two-step process and unless your BIOS offers option to boot from file on disk you will need to boot from external medium anyway.
I reinstalled and added an EFI partition which I set to mount at /boot/efi and still os-prober returns nothing and Windows isn’t in GRUB.
fdisk -l now gives the following
Disk /dev/sdb: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: JAJS600M512C
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A18D95E8-A535-4A0E-9C3C-D924DF33BC39
Device Start End Sectors Size Type
/dev/sdb1 2048 18431 16384 8M BIOS boot
/dev/sdb2 585299968 743180287 157880320 75.3G Linux filesystem
/dev/sdb3 468992 585298157 584829166 278.9G Microsoft basic data
/dev/sdb4 743180288 996020223 252839936 120.6G Linux filesystem
/dev/sdb5 996020224 1000215182 4194959 2G Linux swap
/dev/sdb6 18432 468991 450560 220M EFI System
Partition table entries are not in disk order.
Do I need to get rid of /dev/sdb1 2048 18431 16384 8M BIOS boot ? I’m pretty sure that when I tried that this morning I got a warning from the installer.
I just reinstalled having booted my installer from the UEFI option. Now I have the following results from fdisk -l but there is still no Windows in GRUB and os-prober still reports nothing, not even Suse. I also don’t see any option in BIOS to force EFI. (I previously had Ubuntu installed and never had this issue)
Disk /dev/sdb: 476.94 GiB, 512110190592 bytes, 1000215216 sectors
Disk model: JAJS600M512C
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: A18D95E8-A535-4A0E-9C3C-D924DF33BC39
Device Start End Sectors Size Type
/dev/sdb1 585299968 586348543 1048576 512M EFI System
/dev/sdb2 586348544 743878655 157530112 75.1G Linux filesystem
/dev/sdb3 468992 585298157 584829166 278.9G Microsoft basic data
/dev/sdb4 743878656 996020223 252141568 120.2G Linux filesystem
/dev/sdb5 996020224 1000215182 4194959 2G Linux swap
Partition table entries are not in disk order.
It appears the original ESP created by the Windows installation was eliminated, and a new one in a different location created by installing (openSUSE?) Linux. That would mean Windows needs to be “repaired” to be able to boot Windows, and subsequently grub2-mkconfig -o /boot/grub2/grub.cfg or YaST bootloader, run to update Grub’s menu to include Windows.
Does the fresh installation provide a Grub menu with a bootable Leap?
If yes, what does tree /boot/efi/ report?
If no, what does tree /<mountpoint-for-ESP-partition>/ report?
If you had a backup of the original ESP prior to its elimination you should be able to simply copy Windows’ directory from its EFI directory to the current ESP to make Windows bootable, once you’ve included os-prober in a grub.cfg regeneration.
Windows installation media have repair functionality, and will offer menu options seeing it has already been installed. You shouldn’t need activation again at all. A previous one got recorded @M$, including a hardware inventory. A boot repair needn’t diddle with the installed system except maybe to record the new ESP’s UUID or volume label or other minor tidbits.