Centos 6.8 startup damage repair
-
Two days ago, I encountered a problem. centos had to start with CD to enter the system. At that time, I wanted to perform a test. Now I have time to try it in VMWare.
-
The idea is this: delete the files in the boot and restart the system to check the effect.
The specific process is as follows:
- First, the information below the boot is assigned to a remote device, so that you can download it later.
-
Delete the following items under boot and restart it. This grub seems to be in the MBR of the disk. Deleting the files under the boot will not affect it.
-
We can use the system CD to enter rescure mode to restore data.
- If the screen is still black, run the following command to fix grub. After restarting, you can access the system normally.
chroot /mnt/sysimagegrub-install /dev/sda
Summary:
- Even if the files under the boot file are not copied back, it may not start normally. In this case, you need to repair the grub file. Here, I fixed sda instead of sda1.
Postscript: other tests
- I directly return the existing data from the remote rsync in the normal system. After the restart, the data is normal because it will not be erased.
- If I delete the file first, and then copy it back (without restarting), I will find that the problem of Error15 may occur. In this case, I also need to fix it. Later, I did it again without any problems.
Conclusion:
- If the files in boot are lost, copy them back to the white
- Chroot/mnt/syslinux & grub-install/dev/sda is not required.
- Sometimes you can access the system, but you may encounter the following scenarios. After the system is completed, it will automatically restart.