public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: viro@parcelfarce.linux.theplanet.co.uk
Cc: linux-fsdevel@vger.kernel.org, Linus Torvalds <torvalds@osdl.org>
Subject: Re: pivotroot does not work with initramfs
Date: Tue, 25 Nov 2003 21:02:28 +0100	[thread overview]
Message-ID: <20031125200228.GA25161@suse.de> (raw)
In-Reply-To: <20031122215054.GH24159@parcelfarce.linux.theplanet.co.uk>

 On Sat, Nov 22, viro@parcelfarce.linux.theplanet.co.uk wrote:

> On Sat, Nov 22, 2003 at 09:48:54PM +0100, Olaf Hering wrote:
> > --- linuxppc-2.5_2.6.0-test9-bk.orig/fs/namespace.c     2003-10-08 03:52:02.000000000 +0200
> > +++ linuxppc-2.5_2.6.0-test9-bk/fs/namespace.c  2003-11-22 21:46:27.000000000 +0100
> > @@ -99,6 +99,7 @@ EXPORT_SYMBOL(lookup_mnt);
> >  static int check_mnt(struct vfsmount *mnt)
> >  {
> >         spin_lock(&vfsmount_lock);
> > +       if(mnt->mnt_parent->mnt_parent != mnt)
> >         while (mnt->mnt_parent != mnt)
> >                 mnt = mnt->mnt_parent;
> >         spin_unlock(&vfsmount_lock);
> 
> That's just plain ugly.  Could you explain what the hell are you trying to
> do?
> 
> If it's an attempt to make pivot_root move rootfs somewhere else - the above
> is nowhere near enough.  If it's something else, I wonder how the could
> that patch change anything.
> 
> *NOTE*: attempting to move rootfs away from root of mount tree is unsupported
> and for a good reason - it complicates logics big way and doesn't buy you
> anything that couldn't be done without it.

Ok, so pivot_root on rootfs is a bad idea. What I do now is to just look
for a /sbin/kinit binary (or something that is passed via kinit=) and run
this. And skip the call to mount_root() in prepare_namespace(). Seems to
work well.
kinit is supposed to find and mount the final root filesystem and mount
it on /root. Then return and let prepare_namespace() do the final work,
free the initmem and run the init process.

I dont know what you have in mind for 2.7, how much of the code will
disappear. We will hopefully use initramfs via cpio for 2.6 and get rid
of linuxrc. Lets see how far we get with that plan.

-- 
USB is for mice, FireWire is for men!

sUse lINUX ag, nÜRNBERG
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2003-11-25 20:09 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-16 17:04 pivotroot does not work with initramfs Olaf Hering
2003-11-19 23:49 ` Greg KH
2003-11-22 16:46 ` Olaf Hering
2003-11-22 20:48   ` Olaf Hering
2003-11-22 21:50     ` viro
2003-11-25 20:02       ` Olaf Hering [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=20031125200228.GA25161@suse.de \
    --to=olh@suse.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=torvalds@osdl.org \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /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