1.闲来无事,想升级下centos的内核。升级方法就很少讲了。centos
http://os.51cto.com/art/201107/274905.htm 按照这篇文章操做的ide
2.升级完后,重启系统,发现系统没法启动,具体缘由是系统没法挂载文件系统。spa
3.在网上找了下资料,缘由出在了initrd是旧版本mkinitrd生成的。htm
因此致使文件系统没法正常挂载ci
4.解决方法就是加入对旧版sysfs路径的支持,方法以下:get
a.经过make menuconfig选中如下对应的选项it
General setup -->io
enable deprecated sysfs features to support old userspace tools编译
5.在这个前面加上* 是系统能支持。class
6.而后我对内核文件进行了从新编译。
7.重启后成功加载文件系统,并使用了新的内核。
一下是系统报错内容,有些出入,能够参考:
Volume group "VolGroup00" not found
Unalbe to access resume device (/dev/VolGroup00/LogVol00)
mount: could not find filesystem '/dev/root'
setuproot:moving /dev failed: No such file or directory
setuproot:error mounting /proc: No such file or directory
setuproot:error mounting /sys: No such file or directory
switchroot: mount failed: No such file or directory
Kernel panic - not syncing:Attempted to kill init!