public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3][try 1] init: enable system-on-initramfs
@ 2007-07-13 18:56 Bodo Eggert
  2007-07-13 18:59 ` [PATCH 1/3][try 1] init: enable system-on-initramfs: enable root=rootfs Bodo Eggert
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Bodo Eggert @ 2007-07-13 18:56 UTC (permalink / raw)
  To: linux-kernel, 7eggert

I toyed with setting up a diskless system in initramfs. In the process, I
came across some things:

1)  There is no way to have the kernel not mount a filesystem,
    unless you use /init or rdinit=.

1a) In the process of writing these patches, I found prepare_namespace not to
    be called if /init is present. prepare_namespace will call
    security_sb_post_mountroot after mounting the root fs. I did not yet see
    a way to call this from /init, and grepping kinit for "security" did not
    help, too.

   This is probably a bug, but using the features of this patchset, you'll
   avoid hitting it. Therefore this patchset does nothing about that.
 
2)  If you want to use tmpfs, you need a script which essentially duplicates
    the work the kernel just did: Mount the root fs, unpack or move the files.
    Using tmpfs instead for the first root mount is as cheap as using ramfs,
    as long as tmpfs is used anyway (and most likely it is).

2a) I figured if you prepared the root fs to contain a running system, you
    woud probably also set up a runnable system on it. Therefore I changed
    the default to boot from tmpfs if there was no /init nor a root= option.
    (If there is a /init, it will be executed as usural.)

    Unfortunately the way I do it, this will override the rdev setting, but
    that should be OK, since rdev is dead. Isn't it?

3)  While I was at it, I figured I would not need most of the init/mount*
    code anymore. Therefore I made patch 3, which ifdefs it out as far as
    possible while still aiming for a small change.

Patch 1 adds the capability to use root=rootfs.
Patch 2 adds the capability to use tmpfs for root, default root=rootfs.
        ramfs becomes optional if rootfs=tmpfs.
Patch 3 allows to remove the capability of automounting filesystems.

All patches appyl to 2.6.22.1
-- 
Fun things to slip into your budget
Remuneration compensation upgrade. (otherwise called a pay raise).

^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <8GGkX-2Xv-5@gated-at.bofh.it>]

end of thread, other threads:[~2007-07-28 16:07 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-13 18:56 [PATCH 0/3][try 1] init: enable system-on-initramfs Bodo Eggert
2007-07-13 18:59 ` [PATCH 1/3][try 1] init: enable system-on-initramfs: enable root=rootfs Bodo Eggert
2007-07-13 19:00 ` [PATCH 2/3][try 1] init: enable system-on-initramfs: root-on-tmpfs Bodo Eggert
2007-07-13 19:02 ` [PATCH 3/3][try 1] init: enable system-on-initramfs: make mount-on-boot optional Bodo Eggert
2007-07-13 19:47 ` [PATCH 0/3][try 1] init: enable system-on-initramfs H. Peter Anvin
2007-07-13 22:37   ` Bodo Eggert
2007-07-13 22:50     ` H. Peter Anvin
2007-07-14 15:20       ` Bodo Eggert
2007-07-14 18:45         ` H. Peter Anvin
2007-07-14 19:46           ` Bodo Eggert
2007-07-14 20:35             ` H. Peter Anvin
2007-07-15  1:58               ` Bodo Eggert
2007-07-18 21:54 ` Rob Landley
2007-07-19 13:56   ` Bodo Eggert
2007-07-19 14:41     ` Stephen Smalley
2007-07-19 17:22       ` Bodo Eggert
2007-07-28 16:07     ` Rob Landley
     [not found] <8GGkX-2Xv-5@gated-at.bofh.it>
2007-07-14 18:49 ` [PATCH 2/3][try 1] init: enable system-on-initramfs: root-on-tmpfs Bodo Eggert
2007-07-15  5:24   ` [PATCH 0/3][try 1] init: enable system-on-initramfs Al Boldi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox