Hardware: UEFI laptop, dual RAID 0 SSD's. Classic M5a2 x86_64 DVD UEFI-booted in rescue mode. Attempting to use the menu option for reinstalling bootloader correctly starts: find_root_parts found md126p7: Mageia (Cauldron) for x86_64 --> Selecting /dev/md126p7 as root fs Mounting other partitions from fstab on /mnt... UUID=1887-3A79 on /mnt/boot/efi type vfat options defaults Your system is ready on /mnt. then fails with unknown bootloader method install_raw_grub2
Whiteboard: (none) => mageia 5 alpha 2Severity: normal => major
AFAIK, reinstalling the bootloader from the classical installer rescue menu-entry has never worked for grub2 (neither for EFI, nor for non-EFI systems). We may have forgotten to document that, though :-/ IIRC, barjac advised to use Super Grub2 Disk to boot into an otherwise unbootable Mageia, and then repair the bootloader. cc'ing him
CC: (none) => marja11, zen25000Hardware: i586 => All
Thanks for the comment Marja, Sorry, I don't know about the Super Grub2 Disk. Where do I download this from?
http://www.supergrubdisk.org/super-grub2-disk/
Blocks: (none) => 416
Super Grub2 unable to reinstall bootloader
(In reply to Tony Blackwell from comment #4) > Super Grub2 unable to reinstall bootloader It may be worth having a chat with Jordan_U on Freenode #grub. He is a grub2 dev and iirc authors the supergrub2 isos.
Appreciate the suggestion. I'm a day from going to spend 3 weeks out-of-touch in the Desert in central Australia, so my lack of response in coming weeks is not lack of interest! Will take it further as soon as I get back. Tonyb
@tablackwell: in #c6 you wrote on 2014-08-20: > Will take it further as soon as I get back.
Keywords: (none) => NEEDINFOWhiteboard: mageia 5 alpha 2 => 5alpha2
I should really generate a /boot/grub2/install.sh and introduce install_raw_grub2() to run it
CC: (none) => thierry.vignaudAssignee: bugsquad => thierry.vignaud
commit df8433f2db7142b045a80391b74c21057a92b2d3 Author: Thierry Vignaud <thierry.vignaud@...> Date: Fri Apr 3 18:17:58 2015 +0200 split install_raw_grub2() out of install_grub2() thus fixing grub2 rescue (mga#13408, mga#13901) --- Commit Link: http://gitweb.mageia.org/software/drakx/commit/?id=df8433f2db7142b045a80391b74c21057a92b2d3 Bug links: Mageia https://bugs.mageia.org/13408 https://bugs.mageia.org/13901
CC: (none) => stormi
The error message about grub2 is now gone (tested with recent boot-nonfree.iso), but it fails afterwards for me. Adding it as follow-up to this report considering the message doesn't suggest a specific issue. If I'm wrong and it works for others I will open a new report. Error message: Error: <grub2-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory See attached picture.
Created attachment 6202 [details] screen photo
Keywords: NEEDINFO => (none)
Setting release blocker since now grub2 is mandatory for UEFI so it's more likely people try to use rescue to reinstall grub2 bootloader.
Priority: Normal => release_blockerBlocks: (none) => 14069
There was a regression that was tracked in bug #15640 Please wait for drakxtools to be uploaded by Thomas or Anne then for drakx-installer-rescue to be rebuild
CC: (none) => wilcal.int
You can try again with last evening rescue. install/stage2/rescue.sqfs must be dated from "07-Apr-2015 20:09". eg: http://distrib-coffee.ipsl.jussieu.fr/pub/linux/Mageia//distrib/cauldron/x86_64/install/stage2/
Keywords: (none) => NEEDINFO
Source RPM: (none) => drakx-installer-rescue
commit 6a38c077285c88dcf4d042ec43b6803ba5c56cb1 Author: Thierry Vignaud <thierry.vignaud@...> Date: Wed Apr 8 05:53:19 2015 -0400 fix detecting grub2 on ESP We only support detecting grub2 on ESP for now. This might help mga#13901 fix: $ detectloader Cannot find a boot loader installed --- Commit Link: http://gitweb.mageia.org/software/drakx/commit/?id=6a38c077285c88dcf4d042ec43b6803ba5c56cb1
Please try again with the rescue that will land in a couple hours on mirrors
I just tried, making sure to use distrib-coffee, and the mirror's current rescue.sqfs is dated 09-Apr-2015 19:32 It did more things, but still failed, now with the following message: sh: /boot/grub2/install.sh: No such file or directory
That's b/c you hadn't first reconfigure it with latest drakboot. We now write a /boot/grub2/install.sh like for grub, but of course, previous install don't have it
Thanks for the precision. We'll maybe have to add in errata that it won't work for a grub2 installed from an older mga release.
I'm still testing this but BIOS issues re laptop RAID delaying me and time is very short, so I'd be happy to see a note in errata re this, and close this bug.
(In reply to Samuel VERSCHELDE from comment #10) > Error: <grub2-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't > exist. Please specify --target or --directory That's because you installed grub2-efi on a !UEFI machine. Or that you disabled UEFI in either firmware or VBox....
(In reply to Thierry Vignaud from comment #21) > (In reply to Samuel VERSCHELDE from comment #10) > > Error: <grub2-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't > > exist. Please specify --target or --directory > > That's because you installed grub2-efi on a !UEFI machine. > Or that you disabled UEFI in either firmware or VBox.... Well, the installation was made in UEFI mode and the boot-nonfree ISO from which I started rescue was copied (not dumped with dd) to the USB key and booted in UEFI mode so it's all UEFI for me. But I haven't got this error message with recent rescue.sqfs. Now I have to test according to comment #18, first reinstalling so that install.sh is created, then rescueing.
CC: (none) => rverschelde
(In reply to Thierry Vignaud from comment #18) > That's b/c you hadn't first reconfigure it with latest drakboot. > We now write a /boot/grub2/install.sh like for grub, but of course, previous > install don't have it New tests, new results! So, now I have no more errors. I boot in rescue mode from boot-nonfree.iso, UEFI, select dc as a mirror, and choose the "restore bootloader" option. Then I select my mga5 system (which was installed in UEFI mode, with grub2-efi), and everything goes fine (except that it lacks a "your bootloader has been restored" success dialog and goes back to the menu). But, sadly, the Mageia boot entry is not made available: the only available option according to my UEFI "bios-like" menu for that disk is the windows system. I must stress that after the bootloader installation from the classical install in UEFI mode, that mageia entry does appear, so it looks like there's something different with what the rescue mode does. I understand that every firmware is different, so here is some background about my computer: * fast boot and secure boot disabled, of course * it offers a global switch between an UEFI mode and a Legacy boot mode. * in UEFI mode, you must, in the setup, select which bootloader you want to start by default: either windows or mageia. After installing mageia, it is not automatically made the default, I have to do that manually in the firmware's boot setup. I don't know if I'm alone in that case and if there's something that can be done at Mageia's installer level or not. Knowing this, here is what I do: * Switch to UEFI * Boot the boot-nonfree ISO in UEFI mode (I'm sure it is in UEFI mode because in that mode my computer won't boot any device in legacy mode, and I made sure to format it as vfat and copy the contents of the ISO to it) * Install Mageia (network install) * Remove key and Reboot * Go to UEFI setup screen (F2) * In boot options, see that there are now 2 options, the former Windows bootloader option, still the default, and a new one called "mageia". Put mageia as the first option. * Save and exit setup * Boot Mageia, everything fine Now, in order to test rescue mode: * Reboot * Switch to Legacy mode * Switch back to UEFI mode * See that the mageia boot option has disappeared (although, I've checked, I still have a "mageia" directory in the EFI boot partition, I thought that was enough but it apparently isn't) * Boot the USB stick again * Select rescue mode, etc., and make it restore the bootloader * After (apparent) success, reboot * Enter UEFI setup (F2) * No "mageia" boot entry available :'( The fastest way I have to actually restore the boot entry is to start another install, and select "Update mageia 5"... Then it will manage to truly restore it.
After deliberately breaking my grub2-efi bootloader, by removing the external HDs I had made my last install on, and after checking I'm indeed dropped to a grub2 emergency shell, using drakx-installer-rescue works fine. It reinstalls the bootloader from the partition I select, and after that I can reboot fine into Mageia again
Thanks marja for the test. This means this bootloader restore use case is covered, with success. We now need to investigate the failure to write the bootloader bits to NVRAM in rescue mode (my comment #23), as discussed during council meeting with tmb. He talked about either efibootmgr that fails or that is not called for some reason.
(In reply to Samuel VERSCHELDE from comment #25) > Thanks marja for the test. This means this bootloader restore use case is > covered, with success. We now need to investigate the failure to write the > bootloader bits to NVRAM in rescue mode (my comment #23), as discussed > during council meeting with tmb. He talked about either efibootmgr that > fails or that is not called for some reason. I could reproduce that, even if switching to legacy mode and back didn't work here to make the Mageia bootloader disappear. However, running "efibootmgr -O" did the job fine. After that in the UEFI 10 boot choices were visible, but Mageia had disappeared. This time, using drakx-installer-rescue, everything seemed to go exactly as in my earlier test. However, on reboot I still got the Windows bootloader. In the UEFI, the boot order list was exactly the same as before, with Mageia still missing.
Summary: rescue mode reinstall bootloader fail unknown method install_raw_grub2 => rescue mode fails to reinstall grub2 bootloader in UEFI mode (was: unknown method install_raw_grub2)
Please open a new bug report with info from comments #23 & #25. The original issue was fixed (crash b/c there was no install_raw_grub2()). Then a secondary issue was fixed by generating /boot/grub2/install.sh Let's stop mixing issues, this bug report is already too long. Thanks
Status: NEW => RESOLVEDResolution: (none) => FIXED
(In reply to Thierry Vignaud from comment #27) > Please open a new bug report with info from comments #23 & #25. That became bug 15695 > The original issue was fixed (crash b/c there was no install_raw_grub2()). > Then a secondary issue was fixed by generating /boot/grub2/install.sh > > Let's stop mixing issues, this bug report is already too long. > Thanks
Summary: rescue mode fails to reinstall grub2 bootloader in UEFI mode (was: unknown method install_raw_grub2) => rescue mode reinstall bootloader fail unknown method install_raw_grub2