Initrd

Initrd – is an initial RAM disk. It’s mounted before the real root filesystem is mounted. It’s specific to a kernel image, and only really required if your kernel does not have all drivers compiled in but instead loads required drivers as modules. E.g., if your root filesystem is ReiserFS, and your kernel support for this filesystem is modular, then the initrd image will basically contain insmod and the ReiserFS module.

In desktop/server systems, initrd is transient but on embedded systems it may be the only filesystem available.

To see the contents of the initrd image:

The following steps deal with initrd images compressed with cpio – this is the case on my Feisty system.

1. Copy /boot/initrd.img-2.6.20-15-generic (or equivalent) to a temp directory as a .gz file.

2. gunzip initrd.img-2.6.20-15-generic.gz

3. cpio -i –make-directories initrd.img-2.6.20-15-generic

This will dump out a small filesystem which shows the initrd image structure.

TODO: setup Minimax – a linux distribution designed to fit in a 32 mb initrd image.

The original IBM article which describes initrd is here.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s