日期:2014-05-16  浏览次数:21004 次

linux内核升级出现错误:vfs cannot open root device sda2 or unknown-block 0 0
环境:window xp下虚拟机中redhatlinux 9.0,原始内核2.4.20-8,想升级到2.6.18 
内核编译成功,就是在启动的时候总是出现问题: 
VFS:mounted root (ext2 filesystem)
red hat nash version 3.4.42 starting
Mounting /proc filesystem
Creating block devices
Input:AT translated set 2 keyboard as /class/input/input0
vfs cannot open root device sda2 or unknown-block 0 0
Please append a correct "root=" boot option
Kernel panic -not syncing: VFS:Unable to mount root fs on unknown-block(0,0)


我的grub.conf 中的内容是: 


# all kernel and initrd paths are relative to /boot/, eg. 
# root (hd0,0) 
# kernel /vmlinuz-version ro root=/dev/sda2 
# initrd /initrd-version.img 
#boot=/dev/sda 
default=2 
timeout=10 
splashimage=(hd0,0)/grub/splash.xpm.gz 
title Red Hat Linux (2.6.18) 
  root (hd0,0) 
  kernel /vmlinuz-2.6.18 ro root=LABEL=/ 
  initrd /initrd-2.6.18.img 


我把 
kernel /vmlinuz-2.6.18 ro root=LABEL=/中的root=LABEL=/改成root=/dev/sda2就出现了上述错误, 
如果不改就会有错误: 
VFS: Cannot open root device "LABEL" or unknown-block(0,0) 

我df的结果是: 
[root@localhost grub]# df 
Filesystem 1K-blocks Used Available Use% Mounted on 
/dev/sda2 18524524 8714756 8868764 50% / 
/dev/sda1 101089 17376 78494 19% /boot 
none 515444 0 515444 0% /dev/shm 
.host:/ 204804620 106086284 98718336 52% /mnt/hgfs 

这显示根文件系统/就是在/dev/sda2分区上的啊 ,那为何还会加载不上文件系统fs呢?

查了很多资料,试了不少方法也没解决,如 
http://www.lslnet.com/linux/dosc1/60/linux-394706.htm 
http://topic.csdn.net/u/20080715/14/81d32494-655d-4b0e-9480-fd5ebdc2e05e.html 
等 
希望共同探讨,能搞出一个解决方法来 


------解决方案--------------------
又见red hat 9这个老妖怪 多少年前的东西啊,你的两个内核版本差异太大,不是那么好解决的
------解决方案--------------------
探讨
又见red hat 9这个老妖怪 多少年前的东西啊,你的两个内核版本差异太大,不是那么好解决的

------解决方案--------------------
探讨

引用:

引用:
又见red hat 9这个老妖怪 多少年前的东西啊,你的两个内核版本差异太大,不是那么好解决的

以我做LFS的经验,这么大跨度应该是能用的,而且网上也有移植2.6到RH9的教程

你的问题是没有用initrd,或者编译的时候把Buslogic和Intel PXII等几个磁盘驱动选成内建
……