4 Changing GRUB 2 Default Kernel Boot Parameters

To change the boot parameters for the GRUB 2 configuration so that these parameters are applied by default at every reboot, follow these steps:

  1. Edit /etc/default/grub to add kernel boot parameters.

    Edit /etc/default/grub and add parameter settings to the GRUB_CMDLINE_LINUX definition, for example:

    GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 vconsole.keymap=uk 
    crashkernel=1G-4G:192M,4G-64G:256M,64G-:512M  rd.lvm.lv=ol/swap rd.lvm.lv=ol/root biosdevname=0 
    rhgb quiet systemd.unit=runlevel3.target"

    This example adds the parameter systemd.unit=runlevel3.target so that the system boots into multiuser, nongraphical mode by default.

    See Kernel Boot Parameter Reference for more information about kernel parameters.

  2. Rebuild the GRUB 2 configuration.

    Rebuild /boot/grub2/grub.cfg:

    sudo grub2-mkconfig -o /boot/grub2/grub.cfg

    The change takes effect at the next system reboot of all configured kernels.

Note:

For systems that boot with UEFI, the grub.cfg file is in the /boot/efi/EFI/redhat directory because the boot configuration is stored on a dedicated FAT32-formatted partition.

After the system has successfully booted, the EFI folder on that partition is mounted inside the /boot/efi directory on the root file system for Oracle Linux.