Bug 11397 - update adding new kernels to grub2 loses its menu of other boot options?
Summary: update adding new kernels to grub2 loses its menu of other boot options?
Status: RESOLVED FIXED
Alias: None
Product: Mageia
Classification: Unclassified
Component: Installer (show other bugs)
Version: Cauldron
Hardware: x86_64 Linux
Priority: Normal normal
Target Milestone: ---
Assignee: Mageia Bug Squad
QA Contact:
URL:
Whiteboard: M4 alpha 3 x86_64
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-07 09:22 CEST by Tony Blackwell
Modified: 2014-03-15 20:18 CET (History)
1 user (show)

See Also:
Source RPM:
CVE:
Status comment:


Attachments

Description Tony Blackwell 2013-10-07 09:22:00 CEST
Description of problem:

When update addes a new kernel and references previous ones as boot options in Grub2, this seems to be associated with loss of the previous reference in grub2 to the other boot choice; the Mageia_3 partition. I noticed it on about the 3rd addition as I recall - M4a3 x86_64

Hardware: UEFI in legacy mode
GPT partitioned hard disk

It actually wasn't easy to fix; trying to reinstall grub 2 gave some error messages, lilo wouldn't install at all (although it had worked fine when only M3 was on the disk) and I've got M3 back up as a boot option with grub on /dev/sda.

Need to go back and try grub2 again, but backing up stuff while M3 is live.
(The hazards of using a partition on one's main (new) system for testing UEFI and GPT stuff)


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.


Reproducible: 

Steps to Reproduce:
Tony Blackwell 2013-10-07 09:22:41 CEST

Whiteboard: (none) => M4 alpha 3 x86_64

Comment 1 Manuel Hiebel 2013-10-07 13:04:32 CEST
Barry, something for you ?

CC: (none) => zen25000

Comment 2 Barry Jackson 2013-10-07 15:21:33 CEST
(In reply to Manuel Hiebel from comment #1)
> Barry, something for you ?

Not a clue about gpt and uefi yet - sorry.

However, Tony, I would suggest adding an entry for Mga3 manually in /boot/grub2/custom.cfg while testing.
This should then be added to the menu, even if the probed systems go awol.

I guess you tried running update-grub to re-build the menu, and that os-prober is installed? 
Check that /etc/default/grub has GRUB_DISABLE_OS_PROBER=false

There have been over 600 commits to grub2 code since 2.00 was released, but no new release so far.

If you are feeling brave and would like to test the very latest grub2 from bzr trunk then I have an unofficial package built. The versioning will ultimately clash with the next official build (it was only done for my personal testing), but you are welcome to try it. I know that many changes have been made related to efi.
http://mtf.no-ip.co.uk/pub/linux/Mageia/distrib/cauldron/x86_64/media/extra/release/grub2-2.00-50.mga4.x86_64.rpm
I am using it now but not with gpt or efi, *NOTE*: you *must* run grub2-install with whatever arguments are appropriate for your setup after switching to this version as embedded code installed by a previous version is incompatible and it will not boot. Don't forget - do it before re-boot!
Good luck!
Comment 3 Barry Jackson 2013-10-07 15:36:49 CEST
Just to clarify - after re-reading your issue:

On kernel updates a file-trigger is fired which runs grub2-mkconfig to re-build the menu (just like manually running update-grub or update-grub2 which are identical)

grub2-mkconfig adds *only* the current system and it's kernel versions *unless* os-prober is installed and not disabled in /etc/default/grub.

Hope that helps.
Comment 4 Tony Blackwell 2013-10-07 21:45:15 CEST
Thanks Barry for the prompt response.

I'd installed grub2 in sda via the M4a3 x86_64 install process, then on later reboot had added M3 via MCC -> boot.  Having previously been only a lilo user, the configuration issues you discuss are news to me so your post is timely!

I have downloaded 'your' grub2, for my other UEFI/GPT system, which is a new ASUS laptop on which so far all M4a3 installs have failed (see bug 11313).  Problem there is that a grub2 install seems to go OK and everything is on the disk partition, but grub2 boot always fails.  I'll see if your grub2 helps and there's no harm done on a new empty system.

2 things:
a) how do I 'unpack' your rpm as I'll probably have to manually insert grub2 onto the target system from the install disk in rescue mode, as it won't boot.  Any better ideas?
b) could you expand on your earlier comment: 
"*NOTE*: you *must* run grub2-install with whatever arguments are appropriate for your setup"  - for a non-grub2 user! 
- and how do I do this, again from rescue mode with the classic installation disk? (chroot to the relevant partition and do it from there? or won't it see some necessary environment settings?

With thanks.  I'll keep this open pending progress.
Comment 5 Barry Jackson 2013-10-08 00:18:55 CEST
I think you will need to use grub2-efi not grub2.

There is a /usr/share/doc/grub2/README.Mageia in the grub2 package and also a README.efi in the grub2-efi package. These may help.

I don't think the installer can detect efi hardware and install grub2-efi where needed yet, so maybe best to install just the default grub legacy and then use a live CD and chroot into the new system to install and set up grub2-efi.
You may find this url handy: http://mtf.no-ip.co.uk/pub/linux/barjac/soft/mychroot. It's just a little script to set up a chroot - much easier than remembering all the binds etc. It's easy to grab it from there when running a live CD.

I think README.Mageia will answer your questions about running grub2-install ;)

Please remember I really know nothing about efi/gpt as I have no hardware, so please do more research. There is at least one other bug where efi is being discussed.
The guy who wrote the README.efi certainly used the grub2-efi package in Mageia.

Ah - I have been following (bug 11313) with interest and only just realized it's you :)

If you do want to test grub2-efi from trunk then just add the "-efi" in the url I gave you, it should be there.
Comment 6 Tony Blackwell 2014-03-15 20:18:21 CET
This area has moved-on as of M4 version 2, with some EFI support.  I think this can be closed pending expected full EFI support in M5

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


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