[lkml]   [2002]   [Apr]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: How far has initramfs got ?
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 (should also
work for 2.4.18) and (for later kernels):

[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", ...);
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.


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.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 13:25    [W:0.046 / U:1.924 seconds]
©2003-2017 Jasper Spaans. hosted at Digital OceanAdvertise on this site