diff -u -U 5 -r --new-file -x *~ -x *.[oa] linux-2.4.26.orig/init/do_mounts.c linux-2.4.26/init/do_mounts.c --- linux-2.4.26.orig/init/do_mounts.c Fri Nov 28 19:26:21 2003 +++ linux-2.4.26/init/do_mounts.c Fri Apr 23 15:34:27 2004 @@ -346,10 +346,11 @@ } static void __init mount_block_root(char *name, int flags) { char *fs_names = __getname(); char *p; + int retries = 0; get_fs_names(fs_names); retry: for (p = fs_names; *p; p += strlen(p)+1) { int err = sys_mount(name, "/root", p, flags, root_mount_data); @@ -368,12 +369,20 @@ * and bad superblock on root device. */ printk ("VFS: Cannot open root device \"%s\" or %s\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", - kdevname(ROOT_DEV)); + if (++retries > 5) + panic("VFS: Unable to mount root fs on %s", + kdevname(ROOT_DEV)); + else { + /* wait 1 second and try again */ + printk ("Retrying in 1 second, try #%d\n", retries); + current->state = TASK_INTERRUPTIBLE; + schedule_timeout(HZ); + goto retry; + } } panic("VFS: Unable to mount root fs on %s", kdevname(ROOT_DEV)); out: putname(fs_names); sys_chdir("/root");