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
- Access the server's command line as the 'root' user via SSH or Terminal in WHM.
-
Run the following command and record the output:
grubby --info=DEFAULT|grep args|cut -f2 -d '"'
-
Create the
/etc/default/grubfile:touch /etc/default/grub
- Open
/etc/default/grubin your preferred text editor. -
Ensure
/etc/default/grubcontains 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:
$commandlineargsmust be replaced with the output from thegrubbycommand. - Save the changes and exit the text editor.
- Backup the
grub.cfgfile if it exists.-
BIOS
cp -a /boot/grub2/grub.cfg{,.$(date +%s)}
-
EFI
cp -a /boot/efi/EFI/redhat/grub.cfg{,.$(date +%s)}
-
- Rebuild the
grub.cfgfile.-
BIOS
grub2-mkconfig -o /boot/grub2/grub.cfg
-
EFI
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
-