Product SiteDocumentation Site

12.2. Editing the GRUB Configuration

The GRUB boot loader uses the configuration files /etc/default/grub and the scripts in etc/grub.d/. To configure GRUB to boot from the new files, add a boot stanza to /etc/grub.d/40_custom that refers to them.
A minimal boot stanza looks like the following listing:
menuentry "Fedora Linux" {
        set root=(hd0,1)
        linux /vmlinuz-install
        initrd /initrd.img-install
You will also need to specify the location of the second stage installer image by adding an option to the end of the linux line of the boot stanza. For example:
linux /vmlinuz-install stage2=http://my.internal.server/17/x86_64/os/
If the second stage image and the package repositories you will be downloading from are on the same server, use the repo= option instead.
You may wish to add additional options to the end of the linux line, which will set preliminary options in Anaconda that the user normally sets interactively. For a list of available installer boot options, refer to Chapter 11, Boot Options.
The following options are generally useful for medialess installations:
When you are finished, run the following command with root privileges to refresh the grub.cfg file:
grub2-mkconfig --output=/boot/grub2/grub.cfg
Next, open grub.cfg to view the updated configuration. Locate your new menu entry stanza and determine its place in the stanza order.
Finally, change the GRUB_DEFAULT option in /etc/default/grub to point to the new stanza you added. 0 will refer to the first stanza, 1 to the second, and so on. For example:
Alternatively, specify the menu entry title. This is particularly useful if you have a number of menu entries across the various script files.
GRUB_DEFAULT="Fedora Linux"