当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > RHEL 5服务器系统下故障处理方法

Unix/Linux
linux查看内存的大小
在linux下写的代码,用的是utf-8,结果拿到XP下运行的时候,所有的中文都成乱码
linux su和sudo命令的区别
linux cron 下的定时执行工具使用技巧
linux 查找进程及终止进程操作的相关命令
redhat linux 安装 gcc编译器
Linux Mplayer播放各种格式的电影
一起回顾一下linux常用命令
Linux 网站项目发布要做哪些配置
linux SSH配合SecureCRT的密匙完美使用方法
GD 编译出错解决方法
Facebook Open Platform编译FAQ
Linux 系统硬盘 优化
linux 挂载详解
linux crontab定时命令
Linux 系统中确保访问三级域名畅通的方法
Linux 特权帐号VS普通帐号
确保Linux系统安全的前提条件 漏洞防护
Linux 监视系统资源使用率
Red Hat Linux上使用BIND建立DNS服务器

Unix/Linux 中的 RHEL 5服务器系统下故障处理方法


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 22 ::
收藏到网摘: n/a

一、/boot下面的文件全部丢失:( grub ,kernel,initrd ramdisk)

 

1.用bootdisk启动,进入liunx rescue模式,选择local install或nfs (http)安装方式

 

2.进入修模模式:

 

(1). cd /mnt/sysimage

 

查看有些什么文件(假如是空的)

 

(2) install kernel:

 

cd /mnt/source/Server

 

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

 

(3)切换/

 

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

 

(注: LABEL可以用e2label查看)

 

initrd /initrd-2.6.18-8.el5.img

 

(7).exit

 

(8) reboot

 

二、/etc/inittab丢失

 

故障现象:集在输入Enter runlevel:就不动了

 

1.进入rescue模式

 

2. chroot /mnt/sysimage

 

3. rpm -qf /etc/inittab属于哪个包.

 

4.exit

 

5. cd /mnt/source/Server

 

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

 

6.reboot

 

三、/etc/fstab丢失

 

故障现象:在检测mount partition时starting system logger

 

1.进入rescue

 

2.mkdir /test

 

3.mount根分区

 

(1).用fdisk -l查看分区,然后用e2label查看各partition的label name.

 

(2) mount /dev/hda6 /test

 

(3) cd /test

 

(4)用e2label查看各分区的label name

 

注意有规律:各label name与要mout的directory name是差不多的.

 

(5).参照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

 

注:原则是三个partition是一定mount / ,/boot,swap.

 

(4) reboot