Centos 6.8 startup damage repair

Source: Internet
Author: User

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
  • 1
  • 2
  • 1
  • 2

Summary:

  1. 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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.