Red Hat Bugzilla – Bug 845446
syntax for grub2-mkconfig is required at section 12.2 "editing grub" needs
Last modified: 2013-07-29 13:22:32 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
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
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 <email@example.com>.
[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
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)