Description of problem: Installing Mageia 5 beta 3 onto a Dell XPS 13 laptop with EFI and with windows already installed. The entry in grub.cfg was ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Boot Manager' { chainloader /EFI/Microsoft/Boot/bootmgfw.efi boot } which did not work -- no file found. Instead it should probably have been ### BEGIN /etc/grub.d/30_os-prober ### menuentry 'Windows Boot Manager' { chainloader /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi boot } which does work. Reproducible: Steps to Reproduce:
Assignee: bugsquad => zen25000Source RPM: (none) => grub2, os-prober
To workaround this until a solution is found you can add: menuentry 'Windows Boot Manager' { chainloader /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi boot } to /boot/grub2/custom.cfg and to remove the bad entry: EITHER remove the os-prober package: urpme os-prober OR if os-prober is needed to find other OSs add this line to /etc/default/grub and run update-grub: GRUB_OS_PROBER_SKIP_LIST="<uuid of win partition>@/dev/sdaX" (where /dev/sdX is the windows partition) e.g. GRUB_OS_PROBER_SKIP_LIST="A3F5-6DF3@/dev/sda1" Not doing the above until this is fixed, will cause your changes to grub.cfg to be overwritten on some system updates. To be honest I prefer to do the above anyway rather than use os-prober where Windows is involved.
This is duplicate of #15497.
CC: (none) => dedykjp
(In reply to Fryderyk Mazurek from comment #2) > This is duplicate of #15497. I would say not, since this appears to be related to the path, whereas 15497 seems to require modules not already loaded.
(In reply to w unruh from comment #0) > Description of problem: Installing Mageia 5 beta 3 onto a Dell XPS 13 laptop > with EFI and with windows already installed. The entry in grub.cfg was > > > ### BEGIN /etc/grub.d/30_os-prober ### > menuentry 'Windows Boot Manager' { > chainloader /EFI/Microsoft/Boot/bootmgfw.efi > boot > } > > which did not work -- no file found. Instead it should probably have been > > > ### BEGIN /etc/grub.d/30_os-prober ### > menuentry 'Windows Boot Manager' { > chainloader /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi > boot > } > > which does work. What version of Windows is this? Please run the following commands in Mageia and copy paste the tree produced at the end into a reply here. su cd /boot/EFI rpm -q tree || urpmi tree && tree Thanks
Keywords: (none) => NEEDINFO
It does sound similar to 15497, just the solutions are very different. I found that changing the path worked, 14597 found that changing the preamble to tell grub to look in /dev/sda1 for the file worked. Both seem solutions, although I cannot imagine how mine could work:-( Anyway, Windows 8.1
Created attachment 6076 [details] output of tree command in /boot/EFI
Created attachment 6077 [details] os-prober output from Mageia
Created attachment 6078 [details] os-prober output from fedora on same machine
Created attachment 6079 [details] /etc/grub.d/30_os-prober output on Mageia
Created attachment 6080 [details] /etc/grub.d/30_os-prober output on fedora on same machine
To try to help, I have included both the os-prober and /etc/grub.d/30_os-prober on both Mageia 5 B3 and Fedora 21 on same machine. (They reside in two different partitions.) If you want the 30_os-prober script from fedora I could supply that as well.
That probably would not tell anything since the output for the windows section is the same if I run /etc/grub.d/30_os-prober of /fedora/etc/grub.d/30_os-prober on Mageia. Ie, the differences if any in the scripts seem to make no difference.
*** Bug 15497 has been marked as a duplicate of this bug. ***
A solution: menuentry 'Windows Boot Manager' { chainloader /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi boot } doesn't work to me to fix https://bugs.mageia.org/show_bug.cgi?id=15497 .
Summary: grub2-efi puts wrong Windows file path into grub.conf => grub2-efi puts broken Windows entry into grub.cfg
(In reply to Fryderyk Mazurek from comment #14) > A solution: > > menuentry 'Windows Boot Manager' { > chainloader /boot/EFI/EFI/Microsoft/Boot/bootmgfw.efi > boot > } > > doesn't work to me to fix https://bugs.mageia.org/show_bug.cgi?id=15497 . do you maybe have more than one EFI partition? (you can check by running "parted -l" as root)
CC: (none) => marja11
I have only one EFI partition.
Created attachment 6083 [details] Output of parted -l
(In reply to w unruh from comment #12) > That probably would not tell anything since the output for the windows > section is the same if I run /etc/grub.d/30_os-prober of > /fedora/etc/grub.d/30_os-prober on Mageia. Ie, the differences if any in the > scripts seem to make no difference. Thanks for your work on this, you are right there is no difference in the Fedora 30_os-prober script, except for one unrelated patch that we don't need. It's looking more likely that this one is down to os-prober.
Could you both please test with os-prober-1.65-1.mga5 which will appear on the mirrors soon in the cauldron core/updates_testing repo. Enable and update the repo, then install os-prober and *Don't forget* to disable that repo afterwards. Simply installing the package will update your grub.cfg. This version has several new patches from Fedora, and could explain the differences we are seeing. Thanks, Barry
I ran some tests last night. Unlike my statement above, the Fedora and the Mageia output from os-prober IS different on the two distros. The Mageia output of os-prober is Microsoft/Boot/... while that on fedora is /dev/sda1@EFI/Microsoft/Boot Strangly the output of /lib/os-prober/mounted/50_efi /dev/sda1 /boot/EFI vfat on Mageia is (after about 6 errors in the "error()" function) contains that /dev/sda1@ preamble. It would seem that it is stripped off by something. I will try the patched version. I presume I can just download the patched os-prober package and install via rpm, rather than using urpmi.
Woops. Memory. Here is the Fedora (on fedora) output /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows:efi and here is the Mageia output Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows Here is the Fedora output on fedora from /usr/libexec/os-prober/mounted/05efi /dev/sda1 /boot/efi vfat /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows5:efi and the Mageia output on Mageia of /usr/lib/os-prober/mounted/05efi /dev/sda1 /boot/efi vfat /dev/sda1@/EFI/Microsoft/Boot/bootmgfw.efi:Windows Boot Manager:Windows5:efi Ie, the output of that probe is identical. Somewhere along the line Mageia is stripping off that /dev/sda1@/EFI/ from the head of that output in producing the output from os-prober. I cannot exactly figure out where that is happening. (This is still the old version of os-prober)
Just installed the new version of os-prober and it has created a windows entry that looks much more reasonable. menuentry 'Windows Boot Manager (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-E463-1429' { 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 E463-1429 else search --no-floppy --fs-uuid --set=root E463-1429 fi chainloader /EFI/Microsoft/Boot/bootmgfw.efi }
(In reply to w unruh from comment #22) > Just installed the new version of os-prober and it has created a windows > entry that looks much more reasonable. Good - does it boot Windows?
New version of os-prober completely resolved my issue. Now in VirtualBox and in real UEFI machine I can boot to windows.
(In reply to Fryderyk Mazurek from comment #24) > New version of os-prober completely resolved my issue. Now in VirtualBox and > in real UEFI machine I can boot to windows. \o/ Excellent Please also look out for any regressions booting Linuxes. I have VM tested this in EFI VBox with multiple Mageia installs and also on my real hardware with PC BIOS and also btrfs with no issues, so looking good. Lets see how w unruh get on booting Win. Thanks for your help testing.
(In reply to Barry Jackson from comment #25) > (In reply to Fryderyk Mazurek from comment #24) > > New version of os-prober completely resolved my issue. Now in VirtualBox and > > in real UEFI machine I can boot to windows. > > \o/ Excellent > Please also look out for any regressions booting Linuxes. > On real hw, booting into Windows from the GRUB2-efi bootloader works fine by default, too, now. I see no regressions when booting (only Mageia) Linuxes on the same laptop, only issues that already existed (a minor grub one that I don't care about, and a dracut one that already has a bug report).
Yup. Seems to work. Booted into both Windows and into Fedora from the Mageia EFI grub menu. And works into Mageia as well. So I think this can regarded as solved.
Thx unruh :-) os-prober-1.65-2.mga5 was pushed to core/release over 9 hours ago, so should have landed on all mirrors
Status: NEW => RESOLVEDResolution: (none) => FIXED