1.閒來無事,想升級下centos的內核。升級方法就不多講了。
http://os.51cto.com/art/201107/274905.htm 按照這篇文章操作的
2.升級完後,重啓系統,發現系統無法啓動,具體原因是系統無法掛載文件系統。
3.在網上找了下資料,原因出在了initrd是舊版本mkinitrd生成的。
所以導致文件系統無法正常掛載
4.解決方法就是加入對舊版sysfs路徑的支持,方法如下:
a.通過make menuconfig選中以下對應的選項
General setup -->
enable deprecated sysfs features to support old userspace tools
5.在這個前面加上* 是系統能支持。
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!