Bug 678453

Summary: Grub2 Menu entries doesn't contain the name of distribution
Product: [Fedora] Fedora Reporter: Hedayat Vatankhah <hedayatv>
Component: grub2Assignee: Peter Jones <pjones>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: awilliam, dennis, lkundrak, pjones, vastone
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: RejectedNTH
Fixed In Version: grub2-1.99-13.fc16 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-30 22:55:57 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Hedayat Vatankhah 2011-02-18 00:54:17 UTC
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 19:17:39 UTC
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 19:27:09 UTC
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 19:39:30 UTC
Arrrgghhh 

I should have seen that...

Thank you and sorry for the alarm it worked perfectly....

Comment 4 VastOne 2011-05-07 19:55:26 UTC
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 20:11:20 UTC
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 20:40:41 UTC
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 21:06:29 UTC
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 21:12:03 UTC
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 21:43:48 UTC
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 10:43:23 UTC
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 19:07:51 UTC
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 20:16:23 UTC
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 18:30:53 UTC
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 11:42:35 UTC
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 18:40:08 UTC
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 18:55:21 UTC
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 06:09:14 UTC
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 21:53:43 UTC
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 22:55:57 UTC
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.