MBR (boot grub) lost (dd If=/dev/zero OF=/DEV/SDA bs=446 count=1) Erase MBR
1) Enter rescue mode
2) Chroot/mnt/sysimage put the real root on the hook
3) Start repairing grub and loading grub onto the hard drive. Grub2-install/dev/sda
After the installation is complete, 2 exit will be restarted automatically.
DD IF=/DEV/SDA of=mbr bs=512 count=1 #备份MBR
DD IF=MBR OF=/DEV/SDA #恢复MBR
2. The bootloader configuration file is missing (/boot/grub2/grub.cfg)
Grub> set root=hd0,msdos1 grub> linux16/boot/vmlinuz-###### root=/dev/sda1 ro grub> initrd16/boot/initramf s-####### grub> Boot
# grub2-mkconfig >/boot/grub2/grub.cfg #用此命令生成新的引导配置文件
Over
3. Kernel and driver lost
In rescue mode, forcing the kernel to be reinstalled.
4. Root password is missing
1) On the Boot Menu page, press E to find linux16, remove the parameters from the RO, and add rd.break
2) Ctrl-x continue to start and then be interrupted
3) At this time the real root of the system is hung in a read-only manner under the/sysroot
4) Mount-o remount,rw/sysroot/re-mount as writable
5) chroot/sysroot/to hang the real roots back.
6) passwd command to change password
7) Touch/.autorelabel #打标签
Sync #硬盘同步
2 exit system will continue to start
Over
Linux boot failure handling-Beginner