lkml.org 
[lkml]   [2002]   [Jun]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH][2.5] wait for devices to wake up before mounting root, but don't hang
Don't hang while waiting for root device to come up

Someone mentioned that USB devices etc. can't be used for root fs since
it's probably not yet available at boot time. This approach is broken, for
sure, but it's at least supposed to rescue a small part of the whole (if
you see a panic, you know something went atree).

--- linux-2.5.20/init/do_mounts.c Sun Jun 2 19:44:47 2002
+++ thunder-2.5.20/init/do_mounts.c Mon Jun 3 17:06:25 2002
@@ -298,6 +298,7 @@
}
static void __init mount_block_root(char *name, int flags)
{
+ long l = 0;
char *fs_names = __getname();
char *p;

@@ -318,7 +319,18 @@
* Allow the user to distinguish between failed open
* and bad superblock on root device.
*/
- printk ("VFS: Cannot open root device \"%s\" or %s\n",
+ l++;
+ if (l < 60) {
+ printk ("VFS: Cannot open root device \"%s\" or %s, %li retries left...\n",
+ root_device_name, kdevname (ROOT_DEV), 60-l);
+
+ /* Wait a second and retry */
+ current->state = TASK_UNINTERRUPTIBLE;
+ schedule_timeout(HZ);
+
+ goto retry;
+ }
+ printk ("VFS: Cannot open root device \"%s\" or %s ultimately.\n",
root_device_name, kdevname (ROOT_DEV));
printk ("Please append a correct \"root=\" boot option\n");
panic("VFS: Unable to mount root fs on %s",
--
Lightweight patch manager using pine. If you have any objections, tell me.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:26    [W:0.055 / U:0.020 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site