|
我做了一个软盘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分区的等待时间
很感激大家 |
|