linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] initramfs + sysfs as root fix
@ 2003-08-24  1:57 Garrett Kajmowicz
  2003-08-28  0:40 ` H. Peter Anvin
  0 siblings, 1 reply; 2+ messages in thread
From: Garrett Kajmowicz @ 2003-08-24  1:57 UTC (permalink / raw)
  To: linux-kernel

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@tbaytel.net

--- 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");


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-08-28  0:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-08-24  1:57 [PATCH] initramfs + sysfs as root fix Garrett Kajmowicz
2003-08-28  0:40 ` H. Peter Anvin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).