Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to deal with the common faults in RHEL 5 system

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the knowledge of "how to deal with common failures under RHEL 5". In the operation of actual cases, many people will encounter such a dilemma, so let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. / boot all the following files are lost: (grub, kernel,initrd ramdisk)

1. Start with bootdisk, enter liunx rescue mode, and choose local install or nfs (http) installation mode

two。 Enter mold repair mode:

(1). Cd / mnt/sysimage

Check what files are available (if they are 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/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: LABEL can be viewed with e2label)

Initrd / initrd-2.6.18-8.el5.img

(7). Exit

(8) reboot

2. / etc/inittab is lost

Failure phenomenon: set in the input Enter runlevel: it will not move

1. Enter rescue mode

2. Chroot / mnt/sysimage

3. Which package rpm-qf / etc/inittab belongs to.

4.exit

5. Cd / mnt/source/Server

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

6.reboot

3. / etc/fstab is lost

Failure phenomenon: starting system logger when detecting mount partition

1. Enter rescue

2.mkdir / test

3.mount 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 check the label name of each partition

Note the regularity: each label name is similar to the directory name that you want to mout.

(5). Refer to the contents of 4 vi / test/etc/fstab

LABEL=/1 / ext3 defaults 1 1

LABEL=/boot / boot ext3 defaults 1 1

LABEL=/usr1 / usr ext3 defaults 1 1

LABEL=/home / home ext3 defaults 0 0

/ dev/hda7 swap swap defaults 0 0

Note: the principle is that three partition must be mount /, / boot,swap.

(4) reboot

This is the end of the content of "how to deal with common failures in RHEL 5". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report