QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1456|回复: 6

关于软盘linux 启动时问题请教!

[复制链接]
发表于 2006-5-31 01:14:56 | 显示全部楼层 |阅读模式
我做了一个软盘linux,但是启动的时候出错

VFS:cannont open root device " " or 03:08
please append a current "root= " boot option
kernel panic :VFS cannot to mount rootfs on 03:08

在网上找到可能是下面的原因

通常在Linux启动过程中,内核解压运行完成后,会加载root分区,然后执行root分区上的init脚本。当用户使用硬盘时,硬盘的初始化速度很快。在内核运行完成之前,因为硬盘已经准备就绪了,所以内核可以顺利加载硬盘上的root分区。然而软盘初始化速度要比硬盘慢多了。这样就会出现内核启动完成后,因优盘还没有完成初始化而导致root分区无法被加载的现象。所以要想使用软盘启动Linux就需要延长内核加载root分区的等待时间,办法就是对系统内核初始化代码do_mounts.c作类似上面的修改
* Allow the user to distinguish between failed open
* and bad superblock on root device.
*/
- printk (“VFS: Cannot open root device“%s”or %s”,
+ printk (“VFS: Cannot open root device“%s”or %s”,
retrying in 1 second.", root_device_name, kdevname (ROOT_DEV));
- printk (“Please append a correct “root=”boot option”);
- panic(“VFS: Unable to mount root fs on %s”,
- kdevname(ROOT_DEV));
+ printk (“You may need to append a correct“root=”boot option”);
+ printk (“or wait for the root device to become ready.”);
+
+ /* wait 1 second and try again,
+ * allowing time for hubs/devices to become ready */
+ set_current_state(TASK_INTERRUPTIBLE);
+ schedule_timeout(HZ);
+ goto retry;
)
panic(“VFS: Unable to mount root fs on %s”, kdevname(ROOT_DEV));


我感觉上面修改的代码有问题
我的c语言不行那位能帮忙?
解决一下 让延长内核加载root分区的等待时间

很感激大家了
发表于 2006-5-31 15:08:55 | 显示全部楼层
人气不旺哦,多喊几声吧,帮你顶
回复

使用道具 举报

发表于 2006-5-31 16:41:09 | 显示全部楼层
make sure proper drivers, fs are included while compile the kernel.
say ,you use a ram disk as your root fs, and it it is formatted into ext2fs.
then ram_disk support, initrd_support ,ext2 fs support should be included.
The floppy drivers should also be incude if your boot loader does not load your root fs into ram. besides, the right initrd_start should be specified so the kernel can find the initrd.
.....
It is so common an error that a lot of mis config could cause this error,good luck.
回复

使用道具 举报

 楼主| 发表于 2006-5-31 23:04:14 | 显示全部楼层
thanks to all of you ^_ ^   
回复

使用道具 举报

发表于 2006-6-6 23:21:46 | 显示全部楼层
napobona,
You are right! Really a lot of scenarios, but one thing could confirmed that there was some issue with mounting.

For that race condition, I would take a try by rebuilding the kernel with change in do_mounts.c.

belltolls,
Please response us when you get out of the trouble. Thanks!
回复

使用道具 举报

 楼主| 发表于 2006-6-7 11:07:24 | 显示全部楼层
I have miss a ram config that maybe cause the erro,no the reason i find from the web.Adding a ram support config and rebuilding the kernel,i have pass mounting step,but I have trapped in another erro
回复

使用道具 举报

发表于 2006-6-7 23:32:27 | 显示全部楼层
[quote:637a04fe82="belltolls"]I have miss a ram config that maybe cause the erro,no the reason i find from the web.Adding a ram support config and rebuilding the kernel,i have pass mounting step,but I have trapped in another erro[/quote]
You mean the ramfs support from kernel?
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-23 08:47 , Processed in 0.100447 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表