Bug 740953 - RFE: Provide command to easily update grub.cfg
Summary: RFE: Provide command to easily update grub.cfg
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: rawhide
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Javier Martinez Canillas
QA Contact: Fedora Extras Quality Assurance
: 739691 745185 (view as bug list)
Depends On:
Blocks: 1429352
TreeView+ depends on / blocked
Reported: 2011-09-23 21:18 UTC by Kamil Páral
Modified: 2021-06-10 10:31 UTC (History)
8 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1429352 (view as bug list)
Last Closed: 2021-06-10 10:31:51 UTC
Type: ---

Attachments (Terms of Use)

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):

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.

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