Server Maintenance: troubleshooting methods in RHEL5 system

Source: Internet
Author: User
& Nbsp; 1. all files under/boot are lost: (grub, kernel, initrdramdisk) 1. start with bootdisk, enter the liunxrescue mode, and select localinstall or nfs (http) installation method 2. enter the modulo mode: (1 ). cd/mnt/sysimage  

I. All files under/boot are lost: (grub, kernel, initrd ramdisk)

1. start with bootdisk and enter the liunx rescue mode. select local install or nfs (http) installation method.

2. enter the modulo mode:

(1). cd/mnt/sysimage

View some files (if empty)

(2) install kernel:

Cd/mnt/source/Server

Rpm-ivh kernel-2.6.18-53.el5.rpm -- root =/mnt/sysimage -- force

(3) switch/

Chroot/mnt/sysimage

(4) install grub

Grub-install/dev/hda

(5) make initrd ramdisk

Cd/boot

Rm-rf initrd *

Cd/lib/modules

Mkinitrd/boot/initrd-2.6.18-8.el5.img 2.6.18-8

(6) vi/boot/grub. conf

Default = 0

Timeout = 5

Title Entprise Linux 5.0 2.6.18

Root (hd0, 0)

Kernel/vlimuz.2.6.18.el5 ro root = LABEL =/1 rghb quiet

(Note: You can use e2label to view the LABEL)

Initrd/initrd-2.6.18-8.el5.img

(7). exit

(8) reboot

II. Loss of/etc/inittab

Fault description: set to Enter runlevel: it will not change

1. enter rescue mode

2. chroot/mnt/sysimage

3. which package does rpm-qf/etc/inittab belong.

4. exit

5. cd/mnt/source/Server

Rpm-ivh -- replacepkgs -- root/mnt/sysimage init ...... rpm

6. reboot

III. Loss of/etc/fstab

Fault description: starting system logger during mount partition detection

1. enter rescue

2. mkdir/test

3. mount the root partition

(1). use fdisk-l to view the partition, and then use e2label to view the label name of each partition.

(2) mount/dev/hda6/test

(3) cd/test

(4) use e2label to view the label name of each partition

Note: The label names are similar to the directory names for mout.

(5). refer to vi/test/etc/fstab in section 4.

LABEL =/1/ext3 defaults 1 1

LABEL =/boot ext3 defaults 1 1

LABEL =/usr1/usr ext3 defaults 1 1

LABEL =/home ext3 defaults 0 0

/Dev/hda7 swap defaults 0 0

Note: In principle, the three partitions must be mount/,/boot, and swap.

(4) reboot

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.