diff options
| -rw-r--r-- | Documentation/kernel-parameters.txt | 3 | ||||
| -rw-r--r-- | init/do_mounts.c | 15 |
2 files changed, 18 insertions, 0 deletions
diff --git a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt index b6a0c0fc50df..54c1ff39a8ec 100644 --- a/Documentation/kernel-parameters.txt +++ b/Documentation/kernel-parameters.txt @@ -1099,6 +1099,9 @@ running once the system is up. root= [KNL] Root filesystem + rootdelay= [KNL] Delay (in seconds) to pause before attempting to + mount the root filesystem + rootflags= [KNL] Set root filesystem mount option string rootfstype= [KNL] Set root filesystem type diff --git a/init/do_mounts.c b/init/do_mounts.c index 51bf20ebcf25..185794fcd01c 100644 --- a/init/do_mounts.c +++ b/init/do_mounts.c @@ -6,6 +6,7 @@ #include <linux/suspend.h> #include <linux/root_dev.h> #include <linux/security.h> +#include <linux/delay.h> #include <linux/nfs_fs.h> #include <linux/nfs_fs_sb.h> @@ -228,8 +229,16 @@ static int __init fs_names_setup(char *str) return 1; } +static unsigned int __initdata root_delay; +static int __init root_delay_setup(char *str) +{ + root_delay = simple_strtoul(str, NULL, 0); + return 1; +} + __setup("rootflags=", root_data_setup); __setup("rootfstype=", fs_names_setup); +__setup("rootdelay=", root_delay_setup); static void __init get_fs_names(char *page) { @@ -387,6 +396,12 @@ void __init prepare_namespace(void) mount_devfs(); + if (root_delay) { + printk(KERN_INFO "Waiting %dsec before mounting root device...\n", + root_delay); + ssleep(root_delay); + } + md_run_setup(); if (saved_root_name[0]) { |
