ELevate blocker: GRUB is missing Print

  • 0

Symptoms

You encounter one of the following warnings when running the elevate-cpanel script.

* 2024-03-04 21:08:52 [WARN] *** Elevation Blocker detected: ***
 File "/etc/default/grub" does not exist!

* 2024-04-19 21:29:50 [WARN] *** Elevation Blocker detected: ***
The GRUB2 config file is missing.

 

Cause

This issue occurs when the GRUB configuration files are missing.

 

Resolution

  1. Access the server's command line as the 'root' user via SSH or Terminal in WHM.
  2. Run the following command and record the output:

    grubby --info=DEFAULT|grep args|cut -f2 -d '"'

  3. Create the /etc/default/grub file:

    touch /etc/default/grub

  4. Open /etc/default/grub in your preferred text editor.
  5. Ensure /etc/default/grub contains the following entries:

    GRUB_TIMEOUT=5
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=saved
    GRUB_DISABLE_SUBMENU=true
    GRUB_TERMINAL="serial console"
    GRUB_CMDLINE_LINUX="$commandlineargs"
    GRUB_DISABLE_RECOVERY="true"

    Note: $commandlineargs must be replaced with the output from the grubby command.

  6. Save the changes and exit the text editor.
  7. Backup the grub.cfg file if it exists.
    • BIOS

      cp -a /boot/grub2/grub.cfg{,.$(date +%s)}

    • EFI

      cp -a /boot/efi/EFI/redhat/grub.cfg{,.$(date +%s)}

  8. Rebuild the grub.cfg file.
    • BIOS

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

    • EFI

      grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg

 


Was this answer helpful?
Back

Send Message