linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Garrett Kajmowicz <gkajmowi@tbaytel.net>
To: linux-kernel@vger.kernel.org
Subject: [PATCH] initramfs + sysfs as root fix
Date: Sat, 23 Aug 2003 21:57:53 -0400	[thread overview]
Message-ID: <200308232157.53962.gkajmowi@tbaytel.net> (raw)

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


             reply	other threads:[~2003-08-24  1:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-24  1:57 Garrett Kajmowicz [this message]
2003-08-28  0:40 ` [PATCH] initramfs + sysfs as root fix H. Peter Anvin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200308232157.53962.gkajmowi@tbaytel.net \
    --to=gkajmowi@tbaytel.net \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).