Hi Everyone!
Trond suggested to draft a patch to address the
Floppy Fallback issues (mentioned several times
on lkml) by adding a kernel boot parameter, to
disable the fallback, or to put it more general,
to disable alternate root device attempts ...
Currently the NFS-Root Floppy Fallback is the
only _user_ of such a boot parameter, but in
future, this could be used to limit multiple
root situations to a make-or-brake ...
please comment!
best,
Herbert
------------
diff -NurbBP --minimal linux-2.4.22-pre7-fix/Documentation/kernel-parameters.txt linux-2.4.22-pre7-ffb/Documentation/kernel-parameters.txt
--- linux-2.4.22-pre7-fix/Documentation/kernel-parameters.txt 2003-07-19 14:14:20.000000000 +0200
+++ linux-2.4.22-pre7-ffb/Documentation/kernel-parameters.txt 2003-07-21 23:13:56.000000000 +0200
@@ -389,6 +389,8 @@
noalign [KNL,ARM]
+ noaltroot [NFS] disable alternate root devices (e.g. floppy)
+
noapic [SMP,APIC] Tells the kernel not to make use of any
APIC that may be present on the system.
diff -NurbBP --minimal linux-2.4.22-pre7-fix/init/do_mounts.c linux-2.4.22-pre7-ffb/init/do_mounts.c
--- linux-2.4.22-pre7-fix/init/do_mounts.c 2003-07-21 22:13:12.000000000 +0200
+++ linux-2.4.22-pre7-ffb/init/do_mounts.c 2003-07-21 23:26:18.000000000 +0200
@@ -48,6 +48,18 @@
static int __initdata mount_initrd = 0;
#endif
+static int __initdata no_alt_root; /* 1 = disable alternate root */
+
+/* Disable alternate root attempts (e.g. floppy on NFS) */
+static int __init noaltroot_setup(char *str)
+{
+ no_alt_root = 1;
+ return 1;
+}
+
+__setup("noaltroot", noaltroot_setup);
+
+
int __initdata rd_doload; /* 1 = load RAM disk, 0 = don't load */
int root_mountflags = MS_RDONLY | MS_VERBOSE;
@@ -767,6 +779,9 @@
printk("VFS: Mounted root (nfs filesystem).\n");
return;
}
+ if (no_alt_root)
+ panic("VFS: Unable to mount root fs via NFS\n");
+
printk(KERN_ERR "VFS: Unable to mount root fs via NFS, trying floppy.\n");
ROOT_DEV = MKDEV(FLOPPY_MAJOR, 0);
}
-
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/
This archive was generated by hypermail 2b29 : Wed Jul 23 2003 - 22:00:47 EST