Kernel-2.4 doesn't support the rootdelay option -at least for a little while longer. I submitted a patch to the kernel-2.4 Maintainer a few weeks ago which adds the feature (backported from kernel-2.6.x). It is supposed to be included in the next stable release of kernel-2.4.
Meanwhile, you can apply the patch yourself easily and use it, since you are already compiling your own kernel. It's a really small patch, so I'll just post it here:
Code:
From: Gilbert Ashley <amigo@ibiblio.org> 11 November 2007
This patch adds the 'rootdelay' option to the kernel
command-line boot options. The feature was backported
from the 2.6 kernel series. This allows for mounting
root filesystems which are located on devices whose
drivers are slow to load, such as USB mass-storage devices.
Example: 'rootdelay=10' tells the kernel to wait 10
seconds before trying to mount the rootfs device.
--- ./init/do_mounts.c.00 2007-11-11 17:07:37.000000000 +0100
+++ ./init/do_mounts.c 2007-11-11 17:34:38.000000000 +0100
@@ -6,6 +6,7 @@
#include <linux/ctype.h>
#include <linux/blk.h>
#include <linux/fd.h>
+#include <linux/delay.h>
#include <linux/tty.h>
#include <linux/init.h>
@@ -315,8 +316,16 @@
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)
{
@@ -888,7 +897,15 @@
*/
void prepare_namespace(void)
{
- int is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
+ int is_floppy;
+
+ if (root_delay) {
+ printk(KERN_INFO "Waiting %dsec before mounting root device...\n",
+ root_delay);
+ ssleep(root_delay);
+ }
+
+ is_floppy = MAJOR(ROOT_DEV) == FLOPPY_MAJOR;
#ifdef CONFIG_ALL_PPC
extern void arch_discover_root(void);
arch_discover_root();
--- ./Documentation/kernel-parameters.txt.02 2007-08-15 09:49:06.000000000 +0200
+++ ./Documentation/kernel-parameters.txt 2007-11-11 18:06:41.000000000 +0100
@@ -561,6 +561,9 @@
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
Paste the above into an empty document and save as 'rootdelay-K24.diff'.
You can apply it to the kernel sources by copying it into the toplevel kernel sources, then cd'ing in there an give the command 'patch -p1 rootdelay-K24.diff'
Then re-compile your kernel. You don't need to choose any options during kernel configuration.
Then you can use the feature by putting 'rootdelay=X' in your kernel commandline, where 'X' is the number of seconds to delay.
Usually, you need to give an extra 3-6 seconds as the rootdelay option. 3 seconds is sometimes enough if the drive doesn't have a bunch of partitions. I have one drive with 6 or 7 partitions which needs 6 seconds to register. You may have drives which need even longer. If so, just keep adding time until it works consistently.
You don't really have to use an initrd either, just be sure that you have these options enabled:
Code:
# (under IDE, ATA and ATAPI Block Devices)
# scsi emulation
CONFIG_BLK_DEV_IDESCSI=y
# under SCSI support
CONFIG_SCSI=y
CONFIG_BLK_DEV_SD=y
# extra checks in queing code not strictly needed
CONFIG_SCSI_DEBUG_QUEUES=y
# enable scan all luns -this lets you use multi-card readers painlessly
CONFIG_SCSI_MULTI_LUN=y
# under USB support
# this is main USB support
CONFIG_USB=y
# initial usb filesystem support
CONFIG_USB_DEVICEFS=y
# main USB mass-storage driver
CONFIG_USB_STORAGE=y
# you don't have to have this -it just gives more verbosity in the log
CONFIG_USB_STORAGE_DEBUG=y
# these are for cardereaders -if you plan on using any of these
CONFIG_USB_STORAGE_DATAFAB=y
CONFIG_USB_STORAGE_FREECOM=y
CONFIG_USB_STORAGE_ISD200=y
CONFIG_USB_STORAGE_DPCM=y
CONFIG_USB_STORAGE_HP8200e=y
CONFIG_USB_STORAGE_SDDR09=y
CONFIG_USB_STORAGE_SDDR55=y
CONFIG_USB_STORAGE_JUMPSHOT=y
The only other thing you need in your kernel is support for whichever filesystem your root partition is using. You can have nearly everything else as modules. With a little patience pruning out hard-compiled options, you can cut the size of the kernel to under 800KB. Or just start with the config file for the standard Slackware ide kernel and add in the above options -your kernel should still be around 1200KB so it easily fits on a floppy if you want.