Bug 835517 - grub2-mkconfig fails to update grub.cfg with detected OS's
grub2-mkconfig fails to update grub.cfg with detected OS's
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2012-06-26 07:42 EDT by Stephen
Modified: 2013-08-01 08:05 EDT (History)
7 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 991022 (view as bug list)
Last Closed: 2013-08-01 04:56:44 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
grub.cfg from anaconda Fedora 18 (12.33 KB, application/octet-stream)
2013-01-03 20:12 EST, Leslie Satenstein
no flags Details
grub.cfg from F18 /boot/grub2, created by grub2-mkconfig (17.84 KB, text/plain)
2013-01-03 20:54 EST, Leslie Satenstein
no flags Details
osprober log (696 bytes, text/plain)
2013-04-28 18:53 EDT, Leslie Satenstein
no flags Details
grub.cfg generated by F18 grub2-mkconfig (17.63 KB, application/octet-stream)
2013-04-28 18:54 EDT, Leslie Satenstein
no flags Details
grub.cfg from the /dev/sdd (after manually reselecting boot drive (18.76 KB, application/octet-stream)
2013-04-28 19:42 EDT, Leslie Satenstein
lsatenstein: review+

  None (edit)
Description Stephen 2012-06-26 07:42:47 EDT
Description of problem:

I have a laptop system with three OS's present one in a seperate LVM partition and one on an ext4 partition.  F17 which was a clean install, Rawhide (F18) and F14.  After the install of F17, Grub2 only had that as an option to boot. I ran grub2-mkconfig and it found the F14 and rawhide partitions/OS's but they were not added to my boot menu (i.e. /boot/grub2/grub.cfg).  The command issued was :

grub2-mkconfig -o /boot/grub2/grub.cfg

The output from the command was :

Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.4.3-1.fc17.x86_64
Found initrd image: /boot/initramfs-3.4.3-1.fc17.x86_64.img
Warning: Please don't use old title `Fedora Linux, with Linux 3.4.3-1.fc17.x86_64' for GRUB_DEFAULT, use `Advanced options for Fedora Linux>Fedora Linux, with Linux 3.4.3-1.fc17.x86_64' (for versions before 2.00) or `gnulinux-advanced-41954004-3135-4a7d-9b13-15154e655e61>gnulinux-3.4.3-1.fc17.x86_64-advanced-41954004-3135-4a7d-9b13-15154e655e61' (for 2.00 or later)
Found Fedora release 14 (Laughlin) on /dev/sda1
Found Fedora release 18 (Rawhide) on /dev/mapper/rawhide-rawhide

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

grub2-mkconfig (GRUB) 2.00~beta4

How reproducible:

Every time

Steps to Reproduce:
1. Run grub2-mkconfig
2. Reboot
3. New OS's not avaialable to boot
Actual results:

New OS's not available

Expected results:

New OS's should be available

Additional info:
Comment 1 Vladimir Serbinenko 2012-06-26 07:57:14 EDT
What does "linux-boot-probe /dev/sda1" say?
Comment 2 Stephen 2012-06-26 17:26:48 EDT
(In reply to comment #1)
> What does "linux-boot-probe /dev/sda1" say?

Command Not Found !
Comment 3 Vladimir Serbinenko 2012-06-26 17:42:21 EDT
Sorry, it's "linux-boot-prober /dev/sda1"
Comment 4 Stephen 2012-06-26 18:04:55 EDT
(In reply to comment #3)
> Sorry, it's "linux-boot-prober /dev/sda1"

the response was Nothing !
Comment 5 Stephen 2012-06-26 18:11:02 EDT
I Think I found the problem my boot partition lost some kernel files it looks a bit of a mess in there.I will try and restore them and see what happens.
Comment 6 Stephen 2012-06-28 13:05:29 EDT
Seems to be OK now, however it is a bit confusing that it says it detects the operating systems and then does nothing about it, some sort of error/warning may be useful.
Comment 7 Peter Jones 2012-08-08 15:19:44 EDT
So, can we close this out then?
Comment 8 Leslie Satenstein 2013-01-03 20:12:35 EST
Created attachment 672273 [details]
grub.cfg from anaconda Fedora 18

The grub.cfg (titled grub.bak) from F18 anaconda
Comment 9 Leslie Satenstein 2013-01-03 20:15:37 EST
With Fedora 18 tc3 (the Dec 8 version)
anaconda creates a grub.config that is missing other distributions
Missing from the list was Fedora 17, 

The attached file, grub.bak is from Fedora 18 anaconda installation.
The second grub.cfg file is from /boot/grub2/grub.cfg

Perphaps the DVD image for grub2-mkconfig needs to be updated to the version actually in the Fedora 18 distributed release.
Comment 10 Leslie Satenstein 2013-01-03 20:51:24 EST
Comment on attachment 672273 [details]
grub.cfg from anaconda Fedora 18

This grub.bak is what was produced by anaconda.

Missing is fedora17 (which was an upgraded Fedora16)
Comment 11 Leslie Satenstein 2013-01-03 20:54:26 EST
Created attachment 672283 [details]
grub.cfg from F18 /boot/grub2, created by grub2-mkconfig
Comment 12 Leslie Satenstein 2013-01-03 20:55:45 EST
The original bug 835517

 was for Fedora 17.  This update is for Fedora 18.
Comment 13 Leslie Satenstein 2013-01-09 20:12:10 EST
Problem still persists after test installation of F18 RC3
Comment 14 Leslie Satenstein 2013-01-11 08:04:48 EST
Good Friday Morning.

Here is a significant error that I have encountered with RC4 DVD for 32bit installation.

On a second disk I have Ubuntu and Fedora 17

On the first disk I have taken a 300gig disk, formatted gpt, created two equal sized partitions and installed KDE-Fedora 18 on the first half.

The Ubuntu stuff shows up, but not Fedora 17.

After a reboot, I manually run  grub2-mkconfig, and Fedora 17 is not in grub.cfg

Trouble shoot with anaconda, and I find and can enter Fedora 17

I redo the installation   install Gnome-Fedora 18 on the second half. 

Now after reboot, and manual execution of grub2-mkconfig

KDE Fedora 18 is not visible (not in the grub.cfg) but my Fedora 17 has become visible.

There appears to be a difference in grub2 betweeen the KDE or Gnome versions.

I have  not tried Mate or Cinnamon.  

(I was planning to abandon Gnome as I do want to work with QT5 and KDE)
Comment 15 Leslie Satenstein 2013-01-11 08:07:32 EST
Is there a restriction in that I cannot have two Fedora 18 distributions on the same physical disk?
Comment 16 Mads Kiilerich 2013-01-11 08:35:59 EST
(In reply to comment #15)
> Is there a restriction in that I cannot have two Fedora 18 distributions on
> the same physical disk?

You cannot have two Fedora systems on the same EFI system.

And keep in mind that "anaconda" doesn't initialize lvm unless it is necessary, and grub can thus not see lvm systems.
Comment 17 Leslie Satenstein 2013-04-18 01:19:07 EDT
OSPROBER was updated,  This grub2-mkconfig now works properly. I am not using an uefi environment. And you are right, the second f18 is on another disk.
Comment 18 Leslie Satenstein 2013-04-28 18:53:13 EDT
Created attachment 741295 [details]
osprober log

Refer to entry dated 28 April 2013
Comment 19 Leslie Satenstein 2013-04-28 18:54:51 EDT
Created attachment 741296 [details]
grub.cfg generated by F18 grub2-mkconfig

The drive sdd3 is not included though it was in the osprober listing
Comment 20 Leslie Satenstein 2013-04-28 19:42:43 EDT
Created attachment 741297 [details]
grub.cfg from the /dev/sdd (after manually reselecting boot drive


I used the bios to overide and select F19 (/sdd) as the boot drive. That done, F19 places itself first, and properly included all the other software from /sda through /sdc.

By the way, if /dev/sdd has only msdos or gpt, grub2-mkconfig will omit Suse linux. (I write software and that is why I have so many distributions). Not all distributions have libraries at the same maintenance level.
Comment 21 Leslie Satenstein 2013-05-20 06:57:20 EDT
Still a problem with May 17 version of F19 beta.  Grub2-mkconfig works as expected after a reboot. This indicates that the F19 Fedora version is a later corrected version, versus the anaconda version
Comment 22 Leslie Satenstein 2013-06-05 21:46:39 EDT
This is still a Fedora 19 RC4 issue. Let me explain my config

One CPU with 4 drives
/dev/sda has Russian Fedora 18 spin and some archive storage  
/dev/sdb has Windows 7 (512/2 gig) And Mint14 installed onto the 2nd half
/dev/sdc has Fedora 18 (Vanilla)
/dev/sdd has Fedora 19 (512gig) 

After every kernel installation, I rerun grub2-mkconfig and I do a similar execution with Mint14.

Here is the problem
For /dev/sda and /dev/sdbx (mint), I see all the partitions except /dev/sdd
For /dev/sdc grub2-install does not recognize Fedora 19

Immediately after installing Fedora 19 on the /dev/sdc
The grub only recognizes /dev/sdb (windows and Mint14, and itself Fedora 19)
After the reboot, and after yum update, (which I noted, does not update the installed Grub2, I manually run grub2-mkconfig     and amazingly,

/boot/grub2/grub.cfg  includes entries for each operating system, including the options to boot anterior kernel versions

grub2-install on the anaconda is either not current, or if it calls grub2-mkconfig, it is calling a non-current version. At installation time, all operating systems should be recognized and present in the /boot/grub2/mkconfig
Comment 23 Fedora End Of Life 2013-07-03 22:38:30 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 24 Fedora End Of Life 2013-08-01 04:56:52 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 25 Leslie Satenstein 2013-08-01 08:05:43 EDT
It is Broken.  Broken, Broken. And still broken with FEDORA 19

I have two Fedora 19 installations. One on /dev/sda and one on /dev/sdd  

When I boot from /dev/sda  the grub.cfg does not list the Fedora 19 that is on /dev/sdd

When I boot from /dev/sdd   the grub.cfg on that Fedora 19 does not recognize Fedora 19 on /dev/sda

Is os-prober or the grub software only recognizing one fedora version per system?

It appears to not support duplicate Fedora installations or duplicate other installations.  

I have Fedora 19 on /dev/sda and another on /dev/sdd.
I have Fedora 18 on /dev/sdb and another on /dev/sdc. Grub2-mkconfig does not pick up the second one of either.

Why do I have doubles?   a) One I keep prestine (clean), and with the other, I install interesting software from the repositories, I evaluate, and I uninstall that second Fedora version. I do this for Fedora 18 (2 distinct versions) and Fedora 19 (2 distinct versions).

Really and truly, IT IS BROKEN.

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