* [PATCH][2.5] wait for devices to wake up before mounting root, but don't hang
@ 2002-06-03 23:31 Lightweight patch manager
2002-06-04 0:06 ` Greg KH
0 siblings, 1 reply; 2+ messages in thread
From: Lightweight patch manager @ 2002-06-03 23:31 UTC (permalink / raw)
To: Linux Kernel Mailing List; +Cc: Linus Torvalds
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][2.5] wait for devices to wake up before mounting root, but don't hang
2002-06-03 23:31 [PATCH][2.5] wait for devices to wake up before mounting root, but don't hang Lightweight patch manager
@ 2002-06-04 0:06 ` Greg KH
0 siblings, 0 replies; 2+ messages in thread
From: Greg KH @ 2002-06-04 0:06 UTC (permalink / raw)
To: Lightweight patch manager; +Cc: Linux Kernel Mailing List, Linus Torvalds
On Mon, Jun 03, 2002 at 05:31:03PM -0600, Lightweight patch manager wrote:
> 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).
Why only loop for 60 seconds?
I prefer the patch posted previously by Eric Lammerts that just loops
forever. But that's just me :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-06-04 0:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-06-03 23:31 [PATCH][2.5] wait for devices to wake up before mounting root, but don't hang Lightweight patch manager
2002-06-04 0:06 ` Greg KH
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox