当前位置: 技术问答>linux和unix
求助:2.6内核升级的问题
来源: 互联网 发布时间:2015-07-26
本文导语: 我前面已经发过帖子,到现在我已经折腾了72个小时,查遍了网上各种资料,可是还没有解决问题。我成功地make以后,用grub方式启动,每次都都提示: VFS: Cannot open root device "LABEL=/" or unknown-block(0,0) Please append...
我前面已经发过帖子,到现在我已经折腾了72个小时,查遍了网上各种资料,可是还没有解决问题。我成功地make以后,用grub方式启动,每次都都提示:
VFS: Cannot open root device "LABEL=/" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic VFS: Unable to mount root fs on unknown-block(0,0)
或者:
VFS: Cannot open root device "sda2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic VFS: Unable to mount root fs on unknown-block(0,0)
我已经启动了UFS选项,以下是我的grub.conf:
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# 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=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.6.8)
root (hd0,0)
kernel /vmlinuz-2.6.8 ro root=/dev/sda2
initrd /initrd-2.6.8.img
title Red Hat Linux (2.4.20-8smp)
root (hd0,0)
kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/
initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
下面是我的硬盘分区情况:
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 34089756 1660576 30697496 6% /
/dev/sda1 198321 17404 170678 10% /boot
none 256340 0 256340 0% /dev/shm
到现在我真的已经没有办法了,请那位高手帮我解惑,不胜感激!我的msn:victor_cui@163.net, qq:5559135
VFS: Cannot open root device "LABEL=/" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic VFS: Unable to mount root fs on unknown-block(0,0)
或者:
VFS: Cannot open root device "sda2" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic VFS: Unable to mount root fs on unknown-block(0,0)
我已经启动了UFS选项,以下是我的grub.conf:
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# 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=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.6.8)
root (hd0,0)
kernel /vmlinuz-2.6.8 ro root=/dev/sda2
initrd /initrd-2.6.8.img
title Red Hat Linux (2.4.20-8smp)
root (hd0,0)
kernel /vmlinuz-2.4.20-8smp ro root=LABEL=/
initrd /initrd-2.4.20-8smp.img
title Red Hat Linux-up (2.4.20-8)
root (hd0,0)
kernel /vmlinuz-2.4.20-8 ro root=LABEL=/
initrd /initrd-2.4.20-8.img
下面是我的硬盘分区情况:
df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda2 34089756 1660576 30697496 6% /
/dev/sda1 198321 17404 170678 10% /boot
none 256340 0 256340 0% /dev/shm
到现在我真的已经没有办法了,请那位高手帮我解惑,不胜感激!我的msn:victor_cui@163.net, qq:5559135
|
LABEL=/ need
filesystem -->
Miscellaneous filesystems --->
UFS file system support (read only)
VFS: Cannot open root device "sda2" or unknown-block(0,0)
scsi + buildin
or modules init file must be right
check init file
gunzip /boot/initrd-2.6.8.1.img -c >init
mount init /mnt/init/ -o loop
ls -l /mnt/init/lib/
check preload modules list
if you need ext3 and scsi mod, you should see these modules at the directory
filesystem -->
Miscellaneous filesystems --->
UFS file system support (read only)
VFS: Cannot open root device "sda2" or unknown-block(0,0)
scsi + buildin
or modules init file must be right
check init file
gunzip /boot/initrd-2.6.8.1.img -c >init
mount init /mnt/init/ -o loop
ls -l /mnt/init/lib/
check preload modules list
if you need ext3 and scsi mod, you should see these modules at the directory
|
楼主内核里面scsi驱动和ext3文件系统驱动有没有编进去?最好编成build-in。连模块也不行。。
先有蛋还是先有鸡的问题
先有蛋还是先有鸡的问题
|
grub.conf或lilo.conf文件错误。修改了grub.conf或lilo.conf后,或者硬盘物理位置和分区
发生变化后造成不能正常启动。进入rescue模式,修改grub.conf或lilo.conf即可。注意修
改了lilo.conf后需执行lilo命令(可加-v 参数查看详细信息)
情况描述:
(一)grub的一般情况
1、如果没有找到内核(vmlinuz-x.x.x文件),
出现File not found
Press any key to continue....
说明root(hdx,x)错误,或内核文件名不对
2、如果找到内核后,运行一会,
出现kernel Panic:Not init Found,
一般来说是没有找到根分区(/分区)即root=/dev/xxx不对
3、如果找到内核后,运行一会,
出现Kernel panic: VFS: Unable to mount root fs on ...,
一般来说可能忘了加上initrd /initrd-2.4.21-4.EL.img(大多情况发生在使用scsi硬盘)
4、总的来说grub.conf里面必须存在的就几行。
#more grub.conf
title linux
root (hd0,1) #/boot分区所在位置
kernel /vmlinuz-2.4.21-4.EL ro root=/dev/TEST/root
#内核和根分区(/分区)位置
(根分区可能是LVM和raid,而不仅是hdx和sdx)
initrd /initrd-2.4.21-4.EL.img
转自Linuxsir
看楼主好像是模块工具没升级好造成的。
2.6系列内核编译出来的模块是.ko而2.4是.o
发生变化后造成不能正常启动。进入rescue模式,修改grub.conf或lilo.conf即可。注意修
改了lilo.conf后需执行lilo命令(可加-v 参数查看详细信息)
情况描述:
(一)grub的一般情况
1、如果没有找到内核(vmlinuz-x.x.x文件),
出现File not found
Press any key to continue....
说明root(hdx,x)错误,或内核文件名不对
2、如果找到内核后,运行一会,
出现kernel Panic:Not init Found,
一般来说是没有找到根分区(/分区)即root=/dev/xxx不对
3、如果找到内核后,运行一会,
出现Kernel panic: VFS: Unable to mount root fs on ...,
一般来说可能忘了加上initrd /initrd-2.4.21-4.EL.img(大多情况发生在使用scsi硬盘)
4、总的来说grub.conf里面必须存在的就几行。
#more grub.conf
title linux
root (hd0,1) #/boot分区所在位置
kernel /vmlinuz-2.4.21-4.EL ro root=/dev/TEST/root
#内核和根分区(/分区)位置
(根分区可能是LVM和raid,而不仅是hdx和sdx)
initrd /initrd-2.4.21-4.EL.img
转自Linuxsir
看楼主好像是模块工具没升级好造成的。
2.6系列内核编译出来的模块是.ko而2.4是.o