码迷,mamicode.com
首页 > 其他好文 > 详细

常见系统故障排除

时间:2016-07-03 23:40:05      阅读:295      评论:0      收藏:0      [点我收藏+]

标签:常见系统故障排除:

 

常见系统故障排除:

  1. 确定问题的故障特征是什么

  2. 重现故障

  3. 使用工具收集进一步信息,以确定问题根源

  4. 排除不可能的原因

  5. 定位故障:

从最简单的问题入手

一次只尝试一种方式

  1. 备份源文件

  2. 尽可能借助工具

 

可能会出现的故障:

  1. 管理员密码忘记

进入单用户模式直接修改密码

  1. 系统无法正常启动

a.      grub损坏(MBR损坏,grub配置文件丢失)

   ddif=/dev/sda  of=/root/mbr.backup bs=512count =1 先备份到其他磁盘

   dd if=/dev/zeroof=/dev/sda bs=200 count=1 损坏grub

   sync

   init0

 解决方法1.借助别的主机修复

          2.使用紧急救援模式

             使用完整的系统安装盘

             boot:linux rescue

                   /mnt/sysimage  挂载为读写

 

chroot /mnt/sysroot

mknod

------------------------------

进入rescue

grub进入GRUB命令行

grub>root (hd0,0)  指定root       

root(hd0,0)

 Filesystem type is ext2fs, partition type 0x83

grub>setup (hd0) 安装grub

quit退出

sync

reboot

 

 

grub配置文件丢失

grub> root (hd0,0)

grub> kernel /vmlinuz- ro root =/dev/vo10/root rhgbquiet

grub > initrd /inited-

grub> boot

mv /boot/grub/grub.conf  /root/

sync

 

root  (hd0,0)

kernel /vmlinuz-(TAB)  

initrd /initrd-(TAB)

boot

启动以后手动建立grub.conf

          内容

          default=0

          timeout=10

          title RHEL 5.8

               root (hd0,0)

               kernel /vmlinuz-2.6.18-364.e15ro root=/dev/vo10/root quiet

               initrd /initeamfs-2.6.18-364.e15.i686.img

 

 

 

 

b.      系统初始化故障(某文件系统无法正常挂载,驱动不兼容,)

grub:编辑模式

emergency

 

          

c.      服务故障

进入交互式模式 i,停止故障的服务

 

 

rc.local脚本语法错误或出现逻辑错误

进入单用户模式修复

 

d.      用户无法登陆(bash程序故障)

进入紧急救援模式

mkdir  /media

mount /dev/hdc/media

cd Server

ls | grep bash

rpm –avh –replacepkgs --root  /mnt/sysimage  bash-3.2-32.e15.i386.rpm 覆盖安装

 

  1. 命令无法运行,export PATH=/data/bin

退出当前登录,另起虚拟终端

 /user/bin/vim  /etc/profile

 

 


本文出自 “linux运维” 博客,谢绝转载!

常见系统故障排除

标签:常见系统故障排除:

原文地址:http://coolcl.blog.51cto.com/4514424/1795370

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!