实验目的:重新安装丢失的内核
实验环境:Red Hat Enterprice Linux 5
实验准备:
1. #rm /boot/vmlinuz-2.6.18-53.el5 {删除linux系统内核}
2. #reboot {重启主机发现无法进入系统,停在如下界面}
...
kernel /vmlinuz-2.6.18-53.el5 ro root=LABEL=/
Error 15: File not found
Press any key to continue...
实验步骤:
1. 使用救援光盘引导进入rescue模式。
2. 系统会提示加载硬盘文件系统到/mnt/sysimage,用读写模式挂载。
3. #df {查看救援模式下设备挂载点信息}
4. #mount /dev/hdc /mnt/sysimage/media {挂载光盘到相应目录}
5. #chroot /mnt/sysimage {切换到磁盘根目录,使用chroot shell}
6. #cd /media/Server {切换当前目录到光盘上}
7. #rpm -ivh --force kernel-2.6.18-53.el5.i686.rpm {安装内核rpm包}
8. #ls /boot {确认内核vmlinuz-2.6.18-53.el5已重新安装}
8. #exit {退出chroot shell,进入rescue shell}
9. #exit {退出rescue shell,系统自动重启}
实验总结:
1. 当无法使用内核或无法使用引导装载程序GRUB时,可以使用rescue模式通过本地光盘或网络重新安装相应的rpm软件包,修复系统。
阅读(353) | 评论(0) | 转发(0) |