Bug 845446 - syntax for grub2-mkconfig is required at section 12.2 "editing grub" needs
syntax for grub2-mkconfig is required at section 12.2 "editing grub" needs
Product: Fedora Documentation
Classification: Fedora
Component: install-guide (Show other bugs)
All Linux
unspecified Severity medium
: ---
: ---
Assigned To: Petr Bokoc
Ruediger Landmann
Depends On:
  Show dependency treegraph
Reported: 2012-08-03 02:27 EDT by Maxwell Spangler
Modified: 2013-07-29 13:22 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-07-29 13:22:32 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)

  None (edit)
Description Maxwell Spangler 2012-08-03 02:27:43 EDT
Description of problem:
In the install guide at section 12.2 "Editing the Grub Configuration" this line appears:

"When you are finished, run grub2-mkconfig with root privileges and open the grub.cfg file to view the updated configuration. Locate your new menu entry stanza and determine its place in the stanza order. "

This reads as though the user can type grub2-mkconfig at a root prompt and a new grub.cfg file would be edited.  However, it appears on F16 and F17 that grub2-mkconfig with no parameters produces a new grub.cfg written to standard out (users's shell).  So no changes are made to the grub.cfg file.  When the user opens the grub.cfg file as directed, no changes are noted.

Version-Release number of selected component (if applicable):
Fedora 16 and Fedora 17

How reproducible:
Always in shipping docs.  Not checked for F18.

Steps to Reproduce:
1. Login as root
2. edit /etc/default/grub and make a change to the kernel boot parameters
3. as root execute grub2-mkconfig and watch your changes appear on the screen
4. open grub.cfg and observe that no changes have been made
Suggested change:
Provide a more clear example of how the user should update the grub.cfg file.  Based on the built-in help shown below, I believe using -o or the more literal (for documentation purposes) --output parameter does what the documentation intends.

Using the command below, my changes made in /etc/default/grub carry over to the system's /boot/grub2/grub.cfg file as intended.


[root@elite default]# grub2-mkconfig --help
Usage: grub2-mkconfig [OPTION]
Generate a grub config file

  -o, --output=FILE       output generated config to FILE [default=stdout]
  -h, --help              print this message and exit
  -v, --version           print the version information and exit

Report bugs to <bug-grub@gnu.org>.

[root@elite default]# grub2-mkconfig --output=/boot/grub2/grub.cfg
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-3.4.4-4.fc16.x86_64
Found initrd image: /boot/initramfs-3.4.4-4.fc16.x86_64.img
Found linux image: /boot/vmlinuz-3.4.2-1.fc16.x86_64
Found initrd image: /boot/initramfs-3.4.2-1.fc16.x86_64.img
Found linux image: /boot/vmlinuz-3.3.8-1.fc16.x86_64
Found initrd image: /boot/initramfs-3.3.8-1.fc16.x86_64.img
[root@elite default]#
Comment 1 Jack Reed 2012-11-08 19:04:55 EST
Thanks for catching this, Maxwell. I've verified your report, so I've updated all instances of the grub2-mkconfig command to grub2-mkconfig --output=/boot/grub2/grub.cfg

The commits can be found here:


http://git.fedorahosted.org/cgit/docs/install-guide.git/commit/?id=97eb3ba7372039e59267bbdb93460f7305077259 (this commit merely expands '-o' to '--output=' after I reconsidered)

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