Get the App
SLTechnology News&Howtos  ›  Servers  › 

CentOS7 fixes GRUB boot failure

Shulou Source: shulou.com Published: 2022-06-03 07:42:37 09月21日 Update

GRUB is the default boot process used by most Linux systems, and you can choose to enter a different operating system (if any) through the boot menu. When the configuration file / boot/grub/grub.conf is missing, or the critical configuration is wrong, or is damaged, the further system startup process cannot be completed.

First, the failure phenomenon:

System boot stagnates, displaying the "grub >" prompt

Fault simulation:

Step 1: let's go to the / boot directory and find the file grub2.

Step 2: delete the grub.cfg (startup configuration file) from the grub2 file so that the system will not boot properly.

Step 3: restart the system and the failure interface occurs.

Second, the cause of the failure:

1. The GRUB bootstrap program in MBR is damaged.

2. Missing grub.conf file and incorrect boot configuration

Third, the steps to resolve:

Step 1: boot the first aid mode and load the system image:

Restart the system. When the boot screen appears, quickly press the esc key to boot out the first aid mode and select the CD- ROM Drive option.

Select the second option to enter the first aid system command mode

Step 2: re-establish the loaded sda partition (command: grub2-install / dev/sda)

Rebuild and build the grub menu configuration file (command: grub2-mkconfig-o / boot/grub2/grub.cfg)

Step 3: exit the bash environment

Command: exit

Step 4: restart

Command: reboot

Tags: System file command configuration failure mode first aid menu process selection different operating system key reason can pass prompt way step environment phenomenon Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno MySQL OPPO Reno MariaDB Shulou Tech Info Microsoft