Monday, September 14, 2009

Howto access contents of Linux ramdisk (initrd)

initrd - is a contraction of "initial ram disk." This initrd image is used by the kernel to load drivers before it starts booting. The purpose of this is to let users build modularized kernels that do not contain support for all 40 different SCSI controllers (for example) and still are able to boot from any SCSI hardware. In this case, the initrd image would contain the needed SCSI drivers and any other drivers needed to get the kernel off the ground.

In order to access it's contents we should follow the following steps:
cp /boot/initrd /tmp/initrd.gz
gzip /tmp/initrd.gz
mount /tmp/initrd /mnt -o loop

No comments: