An incorrect configuration in /etc/grub2.conf or  /boot/grub2/grub.cfg can cause CentOS/RHEL 7 to fail to boot. If there are other kernels installed on the system, try one of those first. If the system still does not boot, the following next steps show how to manually modify the boot parameter to fix the problem and let the system boot successfully.


Modifying GRUB parameters before the system boots


1. Power on the system. When the list of kernels appears at the beginning of the boot process, select the kernel to boot using the up/down arrow keys. I currently have only one kernel to boot (the other one is rescue mode), but in your case, you may have multiple kernels to boot from.


2. Press key “e” to edit this entry.


3. Use the arrow keys to move to the linux16 line. Append or change any necessary kernel options that you think was wrongly updated before rebooting the system.


4. Press Ctrl-X to boot the system with the modified kernel options.


5. If the system boots properly, the changes will need to be saved in the grub configuration file. To edit the grub config file, run the below command:

Append or change the kernel options on the GRUB_CMDLINE_LINUX option. Save the file.


6. Run the grub2-mkconfig command to regenerate the grub.cfg file:


For BIOS systems:

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


For UEFI systems:

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


7. Reboot the system and ensure the changes are working as expected. This can also be confirmed by running this command:

# cat /proc/cmdline
Was this answer helpful? 0 Users Found This Useful (1 Votes)