linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Robert White" <rwhite@casabyte.com>
To: <Valdis.Kletnieks@vt.edu>, "'Andrey Borzenkov'" <arvidjaar@mail.ru>
Cc: <der.eremit@email.de>, <linux-kernel@vger.kernel.org>
Subject: RE: Initrd Question
Date: Tue, 17 Feb 2004 18:05:39 -0800	[thread overview]
Message-ID: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA2ZSI4XW+fk25FhAf9BqjtMKAAAAQAAAAodkDQazuxky+8ha4yn4hfQEAAAAA@casabyte.com> (raw)
In-Reply-To: <200402131422.i1DEMWVB011960@turing-police.cc.vt.edu>

In a modern kernel you can safely multiply mount file systems.  In
particular, if you are going to pivot_root you might be better off and
happier if you mount devfs and procfs (and sysfs) in both the old and new
locations before the pivot.

So mount /dev and /proc and /sysfs (etc) as needed before the pivot.
Mount /new-root.
Then mount /new-root/dev /new-root/proc /new-root/sysfs /new-root/dev/devpts
(etc) as you expect to need it after the pivot
Do the pivot.
Then unmount the unneeded /old-root/dev etc.

This should make things much more convenient.

Mount what you need, but don't mount things that init scripts will mount
later.  There isn't much harm to be had in mounting something over itself
(e.g. "mount -t devfs devfs /dev" twice in a row) but it keeps things like
/proc/mounts nice and tidy if you keep it all straight.

Rob.

-----Original Message-----
From: linux-kernel-owner@vger.kernel.org
[mailto:linux-kernel-owner@vger.kernel.org] On Behalf Of
Valdis.Kletnieks@vt.edu
Sent: Friday, February 13, 2004 6:23 AM
To: Andrey Borzenkov
Cc: der.eremit@email.de; linux-kernel@vger.kernel.org
Subject: Re: Initrd Question 

On Fri, 13 Feb 2004 17:14:25 +0300, =?koi8-r?Q?=22?=Andrey
Borzenkov=?koi8-r?Q?=22=20?= said:

> > Should you check for /dev/.devfsd on the real root here? I thought
.devfsd
> > is created by the devfsd process, 
> 
> you are wrong here, sorry. .devfsd is created by devfs.

I see the confusion - .devfsd gets created in the directory that is
/dev at the time devfs starts up.  However, after pivot_root, that directory
has a new name, and that's where we need to check for .devfsd.

It gets even more confusing in some configurations where we end up
unmounting
/initrd/dev and then re-mounting /dev just to get it into the right place..



  reply	other threads:[~2004-02-18  2:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-02-13 14:14 Initrd Question "Andrey Borzenkov" 
2004-02-13 14:22 ` Valdis.Kletnieks
2004-02-18  2:05   ` Robert White [this message]
     [not found] <1oMkR-1Zk-21@gated-at.bofh.it>
2004-02-13 15:23 ` der.eremit
2004-02-13 16:42   ` Jim Gifford
2004-02-13 17:12   ` H. Peter Anvin
     [not found] <1oC26-8eW-9@gated-at.bofh.it>
2004-02-13 13:30 ` der.eremit
  -- strict thread matches above, loose matches on Subject: below --
2004-02-13  3:12 Jim Gifford
2004-02-13 20:34 ` Chris Lingard
2001-06-18  7:20 initrd question Kelledin Tane

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=''\!'~'\!'UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA2ZSI4XW+fk25FhAf9BqjtMKAAAAQAAAAodkDQazuxky+8ha4yn4hfQEAAAAA@casabyte.com' \
    --to=rwhite@casabyte.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=arvidjaar@mail.ru \
    --cc=der.eremit@email.de \
    --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).