昨晚安装测试服务器时,有意执行yum update想看看更新后会有什么反应,结果重新启动后,停留在启动过程中,死机了,并出现以下错误:
switchroot: mount failed:no such file or directory
Kernel panic - not syncing:Attempted to kill init
我的系统是centos5.3 64位,经查原来是升级过程中,内核升级了,这样系统就有两个内核,重新启动时,默认用了最新的内核。为什么新的内核启动不了,我也不知道,请高手指教了。
于是我就修改grup.conf将默认启动是内核变成旧的版本
vi /boot/grub/grub.conf
linux版本不同grub.conf的位置可能不同。用vi打开它
我的打开如下所示
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-164.15.1.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-164.15.1.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-164.15.1.el5.img
title CentOS (2.6.18-128.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-128.el5 ro root=/dev/VolGroup00/LogVol00
initrd /initrd-2.6.18-128.el5.img
default=0既操作系统的启动顺序,现在我的默认是0,将其修改为1,然后保存,重新启动,就OK了。
原创文章,转载请注明: 转载自读思客
本文链接地址: yum update升级内核后无法启动linux



