[lkml]   [2001]   [Dec]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subject[PATCH] tmpfs+inittar, replacement for initrd
The following patch (for linux-2.4.17) enables the kernel to use tmpfs and
an optionally compressed tar file instead of an initrd.

Instead of the /linuxrc-method, inittar completely relies on the "new"
method (pivot_root/chroot).

Since the patch is rather large, you can find it here:

Note that it has only be compiled and tested on i386. I'd like to hear of
experiences on other platforms.

Contents of the patch:
- splitup of drivers/block/rd.c into rd.c (the ramdisk), rdload.c (ramdisk
loader), crdload.c (loader for compressed ramdisks/tar files), irdload.c
(initrd/inittar specific stuff).
- a small tar extractor (drivers/block/tar.c).
- create and mount a tmpfs as root fs (fs/super.c, mount_tmpfs_root()).
- configuration stuff for the above.


- First, just use the benefits of tmpfs and the simplicity of a tar file
instead of an old ramdisk and a *real* file system image. Since inittar
can be enabled/disabled in .config, it may even be an option for 2.4

- For futures kernel versions (2.5 or 2.6), inittar could completely
replace the old initrd and the whole rd stuff. I don't see who needs a
ramdisk when there's a tmpfs.

- Still another option would make booting via tmpfs/inittar mandatory
(IIRC, linus suggested this some time ago). This would allow for large
cleanups in mount_root() (super.c), including root_dev and


- David L. Parsley, for lots of design suggestions (such as splitup of
- Jason A. Pattie for testing and submitting bug reports

Some additional thoughts and instructions:

or (german)


ps: please cc: answers to my address

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:14    [W:0.062 / U:6.536 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site