Product SiteDocumentation Site

5.4. Configuring the GRUB Bootloader

GRUB configuration files can be found in several places:
/etc/default/grub
Configuration for GRUB itself is defined in /etc/default/grub. The default options used when creating new entries for Fedora can also be found here.
/etc/grub.d/
Files in /etc/grub.d are used as templates for creating new GRUB entries as well as custom boot entries.
/boot
The /boot directory contains Fedora's kernel and initramfs.
On BIOS systems, this directory also contains the configuration for GRUB itself.
/boot/efi/EFI
This directory is only found on UEFI systems, and is within the UEFI System Partition. Both GRUB configuration files and the GRUB executable can be found in /boot/efi/EFI.

5.4.1. Permanently adding to Fedora boot entries

The options that GRUB passes to Fedora when booting are generated from the discovered filesystems and from the value of GRUB_CMDLINE_LINUX in /etc/default/grub.
Adding a parameter to the end of GRUB_CMDLINE_LINUX and regenerating grub.cfg will apply the parameter to all current and future Fedora boot entries.

Example 1. In practice: Fixing backlight issues with kernel parameters

Some laptops have problems with the display backlight using the default configuration. The screen might be too bright, too dim, flicker, or even appear to be completely black.
The issue can often be resolved by directing the system to prefer vendor-specific drivers for the backlight using the acpi_backlight=vendor parameter.
  1. With root permissions, open the file /etc/default/grub.
                  # nano /etc/default/grub
                   GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) vconsole.keymap=us rhgb quiet" GRUB_DISABLE_RECOVERY="true" 
    
  2. Add the parameter to the end of GRUB_CMDLINE_LINUX and save the file.
                   GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)" GRUB_DEFAULT=saved GRUB_DISABLE_SUBMENU=true GRUB_TERMINAL_OUTPUT="console" GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) vconsole.keymap=us rhgb quiet acpi_backlight=vendor" GRUB_DISABLE_RECOVERY="true" 
    
  3. Regenerate the GRUB configuration to apply the new changes.
    1. For BIOS systems:
                        # grub2-mkconfig -o /boot/grub/grub2.cfg
      
    2. For UEFI systems:
                        # grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg