public inbox for linux-fsdevel@vger.kernel.org
 help / color / mirror / Atom feed
From: Olaf Hering <olh@suse.de>
To: linux-fsdevel@vger.kernel.org
Subject: Re: pivotroot does not work with initramfs
Date: Sat, 22 Nov 2003 21:48:54 +0100	[thread overview]
Message-ID: <20031122204854.GA9512@suse.de> (raw)
In-Reply-To: <20031122164608.GA8009@suse.de>

 On Sat, Nov 22, Olaf Hering wrote:

>  On Sun, Nov 16, Olaf Hering wrote:
> 
> > 
> > I cant remount the root filesystem rw, mounting proc doesnt work either,
> > mount hangs, no userinput possible. System is a old powermac.
> > It seems pivotroot is either broken, or I dont use it correctly.
> 
> Maybe I'm doing something stupid, or there is no obvious RTMF about how
> to use kinit from klibc properly. bootargs are:
> 
> console=ttyS0,38400 rw ip=eth0 root=/dev/nfs nfsroot=192.168.1.2:/nfsroot/mac kinit=/bin/kinit
> 
> kinit does a pivot_root and returns. prepare_namespace() does
> sys_mount(".", "/", NULL, MS_MOVE, NULL);
> which leads to this loop:
> 
> check_mnt(103)+ swapper c47f51e0 c47f54a0
> 0 c47f51e0 192.168.1.2:/nfsroot/mac c47f54a0 rootfs
> 1 c47f54a0 rootfs c47f51e0 192.168.1.2:/nfsroot/mac
> 2 c47f51e0 192.168.1.2:/nfsroot/mac c47f54a0 rootfs
> 3 c47f54a0 rootfs c47f51e0 192.168.1.2:/nfsroot/mac
> 4 c47f51e0 192.168.1.2:/nfsroot/mac c47f54a0 rootfs
> ...

This seems to cure it.

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



-- 
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-22 20:48 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 [this message]
2003-11-22 21:50     ` viro
2003-11-25 20:02       ` Olaf Hering

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=20031122204854.GA9512@suse.de \
    --to=olh@suse.de \
    --cc=linux-fsdevel@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