RedHat6 Enterprise Edition system fault repair case

Source: Internet
Author: User
Background: to delete all files during system startup and damage the boot program, you must repair the system quickly without compromising data. Rm/boot/*-rfddif/dev/zeroof/dev/sdabs446count1rm-f/etc/inittabrm-f/etc/rc. d/rc. sys...

Background: to delete all files during system startup and damage the boot program, you must repair the system quickly without compromising data.

Rm/boot/*-rf

Dd if =/dev/zero of =/dev/sda bs = 446 count = 1

Rm-f/etc/inittab

Rm-f/etc/rc. d/rc. sysinit

Rm-f/etc/rc. d/rc. loacl

Mv/etc/fstab. bak

In summary, there are four major steps:

1. restore fstab

2. reinstall the kernel

3. reinstall inittab,/etc/rc. d/rc. sysinit,/etc/rc. d/rc. loacl

4. re-write the Boot File

Details:

1. use a CD or network boot mode to enter rescue mode and press Enter. press default. if network boot is used, select the URL mode and enter the appropriate path. if the disk is closed, select Local cdrom, then select continue.

2. first, you need to restore the/etc/fstab file in the/etc/Directory. The/etc/directory belongs to the and partition, so you must first find the and partition, the video/dev/sda2 I am working on is partitioned. create a directory and mount/dev/sda2 to this directory.

3. go to the directory where the file is located and restore fstab. bak to fstab. if the file is lost or incorrect, you need to write the file content and enter exit to restart.

4. enter rescue mode again to restore the kernel file.

5. recover the boot program. all files in/boot are recovered. manually create the/boot/grub. conf file.

Then write the content.

6. restore files such as/etc/inittab/etc/rc. d/sysinit.

Then restart the computer.

Connection: http://v.qq.com/boke/page/w/ I /g/w0101c0e5ig.html

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.