Bug 678453 - Grub2 Menu entries doesn't contain the name of distribution
Grub2 Menu entries doesn't contain the name of distribution
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: grub2 (Show other bugs)
rawhide
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
RejectedNTH
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-17 19:54 EST by Hedayat Vatankhah
Modified: 2011-12-30 17:55 EST (History)
5 users (show)

See Also:
Fixed In Version: grub2-1.99-13.fc16
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2011-12-30 17:55:57 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Hedayat Vatankhah 2011-02-17 19:54:17 EST
Description of problem:
When grub2 generates menu entries for the current installed distribution (Fedora), it is better to include the name of the distribution too. Currently it just says: GNU/Linux, like this:
GNU/Linux, with Linux 2.6.34.6-47.fc13.x86_64

To fix this, a GRUB_DISTRIBUTOR option should be added to /etc/default/grub, like this:
GRUB_DISTRIBUTOR=$(sed "s/.*(\(.*\))/\1/" /etc/system-release)

Then, the output will be a little nicer:
Fedora GNU/Linux, with Linux 2.6.34.6-47.fc13.x86_64
Comment 1 VastOne 2011-05-07 15:17:39 EDT
I tried the recommended solution 

but received this

/etc/default/grub: command substitution: line 2: syntax error near unexpected token `('


Running Fedora 15 

using Grub2 as defualt grub loader with os-prober
Comment 2 Hedayat Vatankhah 2011-05-07 15:27:09 EDT
Please make sure that double quotes (") are really simple ASCII double quotes rather than “ or ” characters. It should fix the problem.
Comment 3 VastOne 2011-05-07 15:39:30 EDT
Arrrgghhh 

I should have seen that...

Thank you and sorry for the alarm it worked perfectly....
Comment 4 VastOne 2011-05-07 15:55:26 EDT
I thought that it had worked...

When I run 

grub2-mkconfig

It shows in terminal the correct output...

I also added 

GRUB_DEFAULT=3

and in terminal it showed it was done correctly

But when I reboot, the grub menu looks the same as before any of these changes..

It is as if grub2-mkconfig is not writing to the MBR 

I confirmed by looking at grub.cfg and it is not updated...
Comment 5 Hedayat Vatankhah 2011-05-07 16:11:20 EDT
Notice that grub2-mkconfig does NOT update grub.cfg automatically. For that, you should tell it to do so, e.g. grub2-mkconfig -o /boot/grub2/grub2.cfg
Comment 6 VastOne 2011-05-07 16:40:41 EDT
In the interest of closure on this subject and for giving any one else finding it information, I had to do the following to write to the correct grub.cfg...

When I setup Fedora grub2, I had to run

sudo grub2-install –grub-setup=/bin/true /dev/sda

to replace the original Ubuntu grub2 setup

To run an update correctly from Fedora now I have to run

sudo grub2-mkconfig -o /media/ubunturoot/boot/grub/grub.cfg

where /media/ubunturoot is just a mount point I have setup...


Thanks for everything!
Comment 7 VastOne 2011-05-07 17:06:29 EDT
I need to start this all over...

sudo grub2-mkconfig -o /media/ubunturoot/boot/grub/grub.cfg

writes it to what I am expecting to be the correct grub.cfg and it is there in that file, but none of what is there is showing on the grub menu or the changed I have made to /etc/default/grub

What have I done wrong to muck this up so badly?
Comment 8 Hedayat Vatankhah 2011-05-07 17:12:03 EDT
I'm not sure about your specific setup, but probably it is using /boot/grub2/grub.cfg or similar (e.g. /boot/grub/grub.cfg).
Comment 9 VastOne 2011-05-07 17:43:48 EDT
It is..

I redid the 

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

to 

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

and this worked...

Thanks
Comment 10 Hedayat Vatankhah 2011-09-06 06:43:23 EDT
The following is better for Fedora 16:
GRUB_DISTRIBUTOR=$(sed "s/\(.*\) release.*/\1/" /etc/system-release)
Comment 11 Fedora Admin XMLRPC Client 2011-09-16 15:07:51 EDT
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.
Comment 12 Adam Williamson 2011-09-30 16:16:23 EDT
Discussed at 2011-09-30 NTH review meeting. Rejected as NTH: this is too trivial a cosmetic issue to be worth taking through a freeze, especially as it involves touching a very critical component (the bootloader). Note that F16 will be unfrozen for some time between Beta release and Final freeze, and per policy you can certainly commit the fix during that time.
Comment 13 Hedayat Vatankhah 2011-10-05 14:30:53 EDT
After installing Fedora 16 Beta, I found that this bug is fixed with the following in /etc/default/grub:
GRUB_DISTRIBUTOR="Fedora"

There was also some other options like default timeout. 
However, after updating grub2 package to grub2-1.99-6.fc16.x86_64, all extra lines are gone and only the following line is present in the file:
GRUB_CMDLINE_LINUX="quiet rhgb"
Comment 14 Hedayat Vatankhah 2011-10-20 07:42:35 EDT
OK since /etc/default/grub is no longer overwritten by updating grub2, this bug can be considered to be fixed. The only problem is that since /etc/default/grub doesn't match grub2's own file, delta rpm's won't work for grub2 and you are always forced to download the whole package.
Comment 15 Adam Williamson 2011-10-20 14:40:08 EDT
That doesn't seem like a fix for this bug, as you still have to manually edit default/grub . We should probably just put the GRUB_DISTRIBUTOR line in there in the grub2 package.
Comment 16 Hedayat Vatankhah 2011-10-20 14:55:21 EDT
Yes, I agree. I thought that the maintainer prefers to keep it as is since the fix is very easy...
Comment 17 Fedora Update System 2011-12-10 01:09:14 EST
grub2-1.99-13.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/grub2-1.99-13.fc16
Comment 18 Fedora Update System 2011-12-11 16:53:43 EST
Package grub2-1.99-13.fc16:
* should fix your issue,
* was pushed to the Fedora 16 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing grub2-1.99-13.fc16'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16975/grub2-1.99-13.fc16
then log in and leave karma (feedback).
Comment 19 Fedora Update System 2011-12-30 17:55:57 EST
grub2-1.99-13.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.

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