CentOS 6 System Rescue mode

Source: Internet
Author: User

CentOS 6 System Rescue mode


Linux学习笔记王振中 M21马克飞象


After learning about the CentOS 5, 6 system start-up process and troubleshooting, the following destructive attempts were made to deepen the impression.
try to repair the system after deleting the/boot directory and the/etc/fstab file
1. First step is to delete the/boot directory and/etc/fstab


Delete/boot/etc/fstab


You can see that although the boot directory cannot be deleted, the files in the directory have all been deleted.


2. Reboot because there is no/etc/fstab file and boot directory system is unable to boot, only through the CD-ROM boot into the system rescue mode


Select optical Drive Boot

Select rescue Mode

After choosing a language and keyboard select No repair does not require network

Select Continue

Partition was not found because the/etc/fstab file was deleted

Select shell start Shell to enter command line mode to start repair


3. Start the Repair


View the hard disk partitions and hang them separately in the search for and/boot partitions


Run Blkid View all block devices found/DEV/SDA1, 2, 3, 54 partitions where partition 5TYPE is swap can be taken. Talk sda1 2 3 respectively, you can see that sda2 is the root, and sda1 is the/boot partition.
A new Fstab file is written to mount information in the/etc/directory under the directory that is mounted on the SDA2 partition.


/dev/sda1 /boot ext4 defaults 0 0
/dev/sda2 /boot ext4 defaults 0 0

Re-enter rescue mode after saving.

After re-entering rescue mode, the system prompts you to find the root



Toggle Root and Mount CD-ROM ready to repair


Run Chroot/mnt/sysimage cutting root and mount the glazing drive to prepare for the next installation kernel

Force the kernel installation with the RPM command! [Alt Text


When installing the kernel, remember to use the –force option to force the installation

The kernel and init files are in the boot directory after installing the kernel successfully


Rewrite the/boot/grub/gurb.conf file


default=0
timeout=5

       root (hd0,0)
       kernel /vmlinuz-2.6.32-642.el6.x86_64 ro root=/dev/sda2
       initrd /initramfs-2.6.32-642.el6.x86_64.img

4. System returns to normal after reboot

November 24, 2016 21:47:27


CentOS 6 System Rescue mode

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.