当前位置: 首页 > 图文教程 > 操作系统 > Unix/Linux > RHEL 5系统下常见故障处理

Unix/Linux
Linux教程:locate用法
wordpress 安装心得
gentoo的一些杂记
用VIM编写C/C++程序
Apache API notes
Apache API note(2)
FBI 供应商开发安全版 Linux 成本优势获青睐
来自HP的真实Linux体验的成功故事
2004全球20大安全隐患排行出炉 专家建议停用IE
启动“gnome-run”对话框
最近郁闷啊
有矢而发,触类旁通[内核学习的方法论]-- 转载自黄嘴企鹅Linux内核研究小组
linux内核阅读计划 -- based on kernel 2.6.8
IBM:大型机使用 Linux 的黄金时代即将到来
windows 环境下配置apache+mysql+php
利用crontab,系统每天定时备份mysql数据库
Linux 操作系统跑Linux慢的分析
php_mysql.dll不能注册的解决方法
距离rhce考试还有17天
决定你一生成就的二十一个信念

Unix/Linux 中的 RHEL 5系统下常见故障处理


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2010-01-15   浏览: 130 ::
收藏到网摘: 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