From: "H. Peter Anvin" <hpa@zytor.com>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Bodo Eggert <7eggert@gmx.de>, linux-kernel@vger.kernel.org
Subject: Re: [RFC][Patch] Allow not mounting a root fs
Date: Sat, 07 Jul 2007 14:45:14 -0700 [thread overview]
Message-ID: <4690096A.4020602@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0707072335160.1536@fbirervta.pbzchgretzou.qr>
Jan Engelhardt wrote:
>
> Come to speak of it, I think you can have it much easier by having the kernel
> exporting the cpio image as a virtual file inside rootfs, so that you could
> re-extract it inside a tmpfs. In other words:
>
> mount -t tmpfs tmpfs /mnt;
> cd /mnt;
> cpio -diuv </initramfs.cpio;
> #
> # switch_root nukes rootfs, pivot_roots and execs some init
> klibc_switch_root .; # or something like that
>
> Of course this needs double the memory than directly mounting tmpfs as
> rootfs, but it's an idea too.
>
Well, we're doing exactly this for non-initramfs initrd, however, it
would definitely be cleaner just to overmount rootfs with a tmpfs before
extraction -- it's an absolutely trivial amount of code; the biggest
complexity would be spotting the kernel command line option to invoke it.
Yet another variant, which works on existing kernels, is to have a
nested cpio, where your rootfs consists of a trivial /init which mounts
tmpfs and extracts another tar- or cpioball.
-hpa
next prev parent reply other threads:[~2007-07-07 21:45 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 2:00 Bodo Eggert
2007-07-06 2:08 ` H. Peter Anvin
2007-07-06 15:00 ` Bodo Eggert
2007-07-06 15:32 ` Dan Aloni
2007-07-06 17:00 ` Andre Noll
2007-07-06 17:16 ` H. Peter Anvin
2007-07-07 18:30 ` Jan Engelhardt
2007-07-07 20:56 ` H. Peter Anvin
2007-07-07 21:13 ` Jan Engelhardt
2007-07-07 21:17 ` H. Peter Anvin
2007-07-18 21:51 ` Rob Landley
2007-07-18 22:50 ` H. Peter Anvin
2007-07-18 22:53 ` Roland M. Kruggel
2007-07-07 21:18 ` Bodo Eggert
2007-07-07 21:39 ` Jan Engelhardt
2007-07-07 21:45 ` H. Peter Anvin [this message]
2007-07-07 21:46 ` Willy Tarreau
2007-07-08 10:36 Al Boldi
2007-07-11 0:46 ` H. Peter Anvin
2007-07-11 4:47 ` Al Boldi
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=4690096A.4020602@zytor.com \
--to=hpa@zytor.com \
--cc=7eggert@gmx.de \
--cc=jengelh@computergmbh.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
Powered by JetHome