Topic Contributors
creator avatar  
mreschke
Matthew Reschke
Site Developer
Created: Oct 5th, 2009
Updated: Jan 16th, 2012
File
Download Selected (zip)
Download Selected (tar.gz)
Edit
Select All
Select None
View
Detail
Detail Preview
Icons
Preview
Show Hidden
Hide Hidden
Full Manager
Reset Defaults
Open In New Tab
Open In New Window
List Archive Contents
Download File
Open
Download Folder (as .zip)
Embedded Linux
Post # 158 permalink Topic #158 by mreschke on 2009-10-05 23:35:09 (viewed 550 times)

References [-][- -][++]

ramdisk ramfs initrd initramfs[-][- -][++]

Lets get a few hard to remember facts straight

This explains perfectly all the ramdisk, ramfs, tmpfs, initrd, and initramfs stuff
http://www.linuxfordevices.com/c/a/Linux-For-Devices-Articles/Introducing-initramfs-a-new-model-for-initial-RAM-disks/

ramdisk is a filesystem stored in memory and treated as a block device, it was the first ram file system, but the problem \
is that it's treated as block device, it takes up a set amount of space even if the file system is only half full, and if you want to \
expand it, you have to re-format it just like a block device, and it must have a type, like ext2...

ramfs is the new type of ramdisk created by Torvalds, it is not seen as a block device, and only takes op the size of its data, it can expand \
and strink as data is added or removed. Later the kernel developers created a better ramfs called tmpfs.

initrd (Initial ramdisk) The kernels first root file system, Initrd refers to the type of filesystem being ramdisk. If the initial root file system \
is a ramdisk, the kernel will call /initrc as its first process.

initramfs (Initial ramfs) The kernels first root file system, initramfs refers to a type of filesystem being ramfs (the new method). This \
ramfs is more expandable (not constrained like a Initrd block device). The kernel will call /init (not initrc) if its first file \
system is a ramfs. This is the most common, it is always a CPIO archive. Even though most distro's call it /boot/initrd.img.. it is \
NOT an Initrd (ramdisk), its a CPIO ramfs archive. And actually, since tmpfs is like ramfs (but better), initramfs is actually \
an instance of tmpfs

You can tell if your Initial Disk is a CPIO ramfs, try

Code Snippet
$ cp initrd.img-2.6.31-16-generic initrd.img-2.6.31-16-generic.gz
$ gunzip initrd.img-2.6.31-16-generic.gz
$ file initrd.img-2.6.31-16-generic

Once you uncompress it and run 'file' on it, it should say ASCII cpio archive...
And to un-CPIO that gunzipped file, just run cpio -imdF initrd.img-2.6.31-16-generic. see Initrd for more.

Hardware[-][- -][++]