Fix GRUB boot failure recovery in Linux system

Fix GRUB boot failure recovery in Linux system

GRUB is the default boot program used by most Linux systems. You can choose to enter different operating systems (if any) through the boot menu. When the "/boot/grub2/grub.conf" configuration file is missing, or the key configuration is wrong, or the boot program in the MBR record is damaged, the Linux host may only display the "grub>" prompt after booting. Complete the further system startup process. As shown in the figure:
Insert picture description here
Put the system CD into the CD-ROM drive and restart the Linux system. When the system starts, press the "F2" key, enter "linuxrescue" at the "boot:" prompt and then "Enter" to enter the Linux system in the "emergency mode" boot CD.
Insert picture description here
Enter emergency mode
Insert picture description here
Insert picture description here1

  1. Boot emergency mode, load system image
chroot /mnt/sysimage/
  1. Re-establish the load sda partition
grub2-install /dev/sda
  1. Rebuild the gmb menu configuration file
grub2-mkconfig -o /boot/grub2/grub.cfg
  1. Exit the bash environment, restart
    exit
    reboot,
    Insert picture description here
    put the hard disk in the first place,
    Insert picture description here
    start the system
    Insert picture description here

Guess you like

Origin blog.csdn.net/qyf158236/article/details/108244122