public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Matthias Kilian <kili@outback.escape.de>
To: linux-kernel@vger.kernel.org
Subject: Re: How far has initramfs got ?
Date: Mon, 29 Apr 2002 12:33:41 +0200	[thread overview]
Message-ID: <20020429103341.GA28127@outback.escape.de> (raw)
In-Reply-To: <171nLP-1WyTImC@fwd09.sul.t-online.com> <20020428174230.GE18102@ravel.coda.cs.cmu.edu> <aahl82$97v$1@cesium.transmeta.com>

On Sun, Apr 28, 2002 at 01:14:58PM -0700, H. Peter Anvin wrote:

[Jan Harkes:]
> > I would like to add that perhaps using tmpfs instead of ramfs would be
> > a nice touch.

I've written some code that allows using an initial tmpfs which gets it's
contents from a tar file (optionally compressed). See

http://www.escape.de/users/outback/linux/patch-2.4.17-inittar.gz (should also
work for 2.4.18) and (for later kernels):
http://www.escape.de/users/outback/linux/patch-2.4.19-pre3-inittar.gz

[hpa, on tmpfs mounted over initramfs:]
> Baloney.  You can't swap out what is actively in use, and something
> that's overmounted is actively used.  You're supposed to clean up the
> contents before overmounting.  I discussed with viro a scheme (using
> two ramfs's) which made that close to automatic, but I think he
> thought it was needless complexity.

But you don't have to swap anything. As I understand, the current concept is:

- a very minimalistic initial fs that doesn't anything meaningful except
  allowing the creation of directories (mount points).
- one or more other fs's on top of this, either overmounted or mounted on a
  mount point.
  
For example, my patch for 2.4.19-preX just does a
  	sys_mount("tmpfs", "/root", "tmpfs", ...);
	sys_chdir("/root");
Later, the tar image is extracted into this tmpfs. There's no need to swap or
unmount any filesystems. If you want to mount another filesystem as root and
throw away the tmpfs, just use chroot(8) and pivot_root(8).

Correct me if I'm wrong.


Ciao,
	Kili

ps: please answer with cc: to my address, since I'm not subscribed to this
mailinglist and may take longer to search the archives for answers.

      reply	other threads:[~2002-04-29 10:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-04-28 14:00 How far has initramfs got ? Christian Koenig
2002-04-28 17:42 ` Jan Harkes
2002-04-28 20:14   ` H. Peter Anvin
2002-04-29 10:33     ` Matthias Kilian [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=20020429103341.GA28127@outback.escape.de \
    --to=kili@outback.escape.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