We need to create an error by ourselves, causing the system to fail to start up. First, back up grub. conf and fstab files, delete the first 446 bytes of MBR, and delete the boot program (the first 512 bytes of MBR are the boot program, followed by the 64-byte partition table, the last two bytes are the end mark.) modify the system file grub. conf and fstab will not be deleted here, but you can change the name so that the system cannot find it. Use the following command
We need to create an error by ourselves, causing the system to fail to start up. First, back up grub. conf and fstab files, delete the first 446 bytes of MBR, and delete the boot program (the first 512 bytes of MBR are the boot program, followed by the 64-byte partition table, the last two bytes are the end mark)
Modify the grub. conf and fstab files of the system. I will not delete them here, but change the name so that the system cannot be found.
Run the following command to overwrite the bootloader (446 characters in the startup boot MBR)
Dd if =/dev/zero of =/dev/sda bs = 446 count = 1
Reboot the system
The system cannot be started and there is no boot program
Enter the CD, press F5 to enter rescue mode, and enter Linux rescue