Bug 740953

Summary: RFE: Provide command to easily update grub.cfg
Product: [Fedora] Fedora Reporter: Kamil Páral <kparal>
Component: grub2Assignee: Javier Martinez Canillas <fmartine>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: collura, cristian.ciupitu, flokip, jofernan, mads, marcosfrm, pjones, robatino
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1429352 (view as bug list) Environment:
Last Closed: 2021-06-10 10:31:51 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:
Bug Depends On:    
Bug Blocks: 1429352    

Description Kamil Páral 2011-09-23 21:18:26 UTC
Description of problem:
When I do some adjustments to /etc/default/grub, there are no instructions how to re-generate the main configuration file /boot/grub2/grub.cfg. In the latter file, there is a note about grub2-mkconfig. grub2-mkconfig by default spits the output of stdout, and you have to redirect the output to the correct file manually.

I would like to see an easier process. In Ubuntu they have an 'update-grub' command, that takes care of everything needed (generates the config and writes it to correct location). I would like to propose to take the same approach in Fedora.

My suggestions:
1. Provide 'update-grub' command that performs everything needed (it seems that calling grub2-mkconfig with correct output redirection is sufficient). Take it from Ubuntu if it is not in upstream.
2. Document in both /etc/default/grub that simple execution of 'update-grub' command will re-generate the grub config file.

Version-Release number of selected component (if applicable):
grub2-1.99-6.fc16.i686

Comment 1 Mads Kiilerich 2011-10-24 15:57:42 UTC
*** Bug 745185 has been marked as a duplicate of this bug. ***

Comment 2 Mads Kiilerich 2011-10-24 23:15:39 UTC
*** Bug 739691 has been marked as a duplicate of this bug. ***

Comment 3 Kamil Páral 2011-10-27 11:06:07 UTC
For reference purposes - the current "workaround" is to run:

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

Comment 4 Fedora Admin user for bugzilla script actions 2021-05-07 00:35:23 UTC
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component.

Comment 5 Javier Martinez Canillas 2021-06-10 10:31:51 UTC
The approach we are taking here is to avoid touching the GRUB configuration as much
as possible. At some point this would come from a grub2-static-config package or
something along those lines and we wouldn't have to ship any grub2 tool at all.

So rather than adding more downstream tools, I would prefer to continue moving in
that direction. The BLS configuration where the boot menu entries are stored as
separate files outside of the GRUB configuration and the unification of the config
file path for EFI and non-EFI platforms are starting points, but there's still more
work to do in order to get there.

Now, if someone is willing to upstream the update-grub tool, we will be happy to
pull it when the package is rebased to newer versions, but we don't really want to
have more downstream tools that we have to maintain in our package.