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.
Description
This issue occurs when the GRUB configuration files are missing.
Workaround
- 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/grub
file.touch /etc/default/grub
- Open
/etc/default/grub
in your preferred text editor. - Ensure the contains the following entries.
GRUB_TIMEOUT=5
Please note that
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"$commandlineargs
must be replaced with the output from thegrubby
command. - Save the changes and exit the text editor.
- 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)}
- BIOS
- Rebuild the
grub.cfg
file.- BIOS
grub2-mkconfig -o /boot/grub2/grub.cfg
- EFI
grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
- BIOS
Comments
0 comments
Article is closed for comments.