Bug 13493 - Grub2-efi generates config with "linuxefi" although "linux" is needed (?)
Summary: Grub2-efi generates config with "linuxefi" although "linux" is needed (?)
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal major
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-08 11:57 CEST by Peter Schwanemann
Modified: 2014-06-11 18:59 CEST (History)
2 users (show)

See Also:
Source RPM: grub2-efi
CVE:
Status comment:


Attachments

Description Peter Schwanemann 2014-06-08 11:57:28 CEST
Since one or two weeks, some updates for grub2-efi have been committed to the repository (but problem exists at least under Version 2.02-0.git9752.2.mga5 (currently installed)). Since than grub2 won't start into linux, as the old "linuxefi" and "initrdefi" are no longer found.

Fix for me was to manually edit /boot/grub2/grub.cfg and replace "linuxefi" with "linux" and "initrdefi" with "initrd" - so the standard ones.

As this is working fine for me I guess there might have been an intended fix which made the old linuxefi obsolete. Maybe during the implementation of this (just a guess) fix changing the grub.cfg-generator has been forgotten?

In short:
* update of grub2-efi regenerates the grub.cfg with "linuxefi" and "initrdefi" calls leaving the linux entries of the grub menu unstartable.
* Replacing the "linuxefi" and "initrdefi" calls with the standard ones let it work again.
Peter Schwanemann 2014-06-08 11:58:09 CEST

Source RPM: (none) => grub2-efi

Barry Jackson 2014-06-08 13:31:25 CEST

CC: (none) => tmb, zen25000

Comment 1 Barry Jackson 2014-06-08 15:40:44 CEST
After talking to upstream it seems that "linuxefi = fedorapolitics" and maybe we should stick with upstream and not use it.

( WDYT Thomas? )

I have built test packages of grub2 without the Fedora patches related to this:
Patch0063: 0063-Add-support-for-linuxefi.patch
Patch0448: 0448-Use-linuxefi-and-initrdefi-where-appropriate.patch

http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/cauldron/x86_64/media/extra/release/grub2-efi-2.02-0.git9752.3.mga5.x86_64.rpm

http://mtf.no-ip.co.uk/pub/linux/barjac/distrib/cauldron/i586/media/extra/release/grub2-efi-2.02-0.git9752.3.mga5.i586.rpm

These also re-enable the on-screen error messages just before bootsplash which may be useful while we are testing efi etc. (the patch that removed them failed to apply after removing the above two patches)
Comment 2 Thomas Backlund 2014-06-09 12:34:39 CEST
(In reply to Barry Jackson from comment #1)
> After talking to upstream it seems that "linuxefi = fedorapolitics" and
> maybe we should stick with upstream and not use it.
> 
> ( WDYT Thomas? )
> 


We can, but in that case you need to add versioned rpm trigger so it automatically modifies linuxefi -> linux and initrdefi -> initrd to keep upgrade path working as they are used in mga4
Comment 3 Barry Jackson 2014-06-09 17:44:47 CEST
(In reply to Thomas Backlund from comment #2)

> We can, but in that case you need to add versioned rpm trigger so it
> automatically modifies linuxefi -> linux and initrdefi -> initrd to keep
> upgrade path working as they are used in mga4

Are there any examples of versioned triggers anywhere? I can't figure out how that would work.

I'm assuming that you mean to run grub2-mkconfig on update only if the currently installed grub2 version is < new version not using linuxefi AND firmware is EFI.

Maybe current version could be picked up in %pre and tested during updates part of %post?
Comment 4 Barry Jackson 2014-06-11 02:21:46 CEST
OK I figured it after some reading.

Fixed in version 2.02-0.git9752.4.mga5 which now drops the 'linuxefi' and will regenerate grub.cfg when updating from a previous version.

Please test as I cannot test an actual update of grub-efi.
Updating using urpmi is more verbose.

Closing as fixed, but please do not hesitate to re-open if there are issues.

Thanks for reporting this.

Status: NEW => RESOLVED
Resolution: (none) => FIXED

Comment 5 Peter Schwanemann 2014-06-11 18:59:28 CEST
I just tested it after installing the updated package. Everything works as it should.

Thank you very much for your effort to fix this bug :)!

Note You need to log in before you can comment on or make changes to this bug.