All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] initramfs + sysfs as root fix
Date: 27 Aug 2003 17:40:33 -0700	[thread overview]
Message-ID: <bijj21$eco$1@cesium.transmeta.com> (raw)
In-Reply-To: 200308232157.53962.gkajmowi@tbaytel.net

Followup to:  <200308232157.53962.gkajmowi@tbaytel.net>
By author:    Garrett Kajmowicz <gkajmowi@tbaytel.net>
In newsgroup: linux.dev.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.
> 
> +++ 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();

It seems ugly, to say the least, to conditionalize this on
CONFIG_ROOT_NFS.  If anything it should be conditionalized on no NFS
root actually configured, which is a very different thing.

(Of course, then nfsroot should be done via initramfs...)

	-hpa
-- 
<hpa@transmeta.com> at work, <hpa@zytor.com> in private!
If you send me mail in HTML format I will assume it's spam.
"Unix gives you enough rope to shoot yourself in the foot."
Architectures needed: ia64 m68k mips64 ppc ppc64 s390 s390x sh v850 x86-64

      reply	other threads:[~2003-08-28  0:40 UTC|newest]

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

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='bijj21$eco$1@cesium.transmeta.com' \
    --to=hpa@zytor.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.