[PATCH] initramfs + sysfs as root fix
From: Garrett Kajmowicz
Date: Sat Aug 23 2003 - 21:03:43 EST
This is my first real patch, so please vet thoroughly
This patch allows a person to not require mounting a root device at startup.
This works idealy for people trying to use the initramfs/sysfs as the only
filesystem.
What happens is that when the root device is set to 0,0 mount_root is not
called. I have tested in VMWare extensively, and the patch is quite minimal.
Please let me know if I should send this somewhere else as well.
Also, please be adviased that I did not dream up the goto - I am just keeping
in line with the existing file structure.
Garrett Kajmowicz
gkajmowi@xxxxxxxxxxx
--- linux-2.6.0-test3/init/do_mounts.c 2003-08-09 00:34:47.000000000 -0400
+++ linux/init/do_mounts.c 2003-08-23 17:22:59.000000000 -0400
@@ -380,6 +380,12 @@
if (is_floppy && rd_doload && rd_load_disk(0))
ROOT_DEV = Root_RAM0;
+#ifndef CONFIG_ROOT_NFS
+ if (MAJOR(ROOT_DEV) == UNNAMED_MAJOR && MINOR(ROOT_DEV) == 0) {
+ goto out;
+ }
+#endif
+
mount_root();
out:
umount_devfs("/dev");
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/