Digging into an initrd File

Digging into an initrd File


This post was last updated on November 3rd, 2020 at 06:08 pm

Please refer to Redhat disk mod for complete information. That page will eventually replace this page.

Unpacking an initrd

# Make and change to a temporary directory
mkdir /tmp/initrdtesting
cd /tmp/initrdtesting

# Grab an initrd you want to work with
cp /boot/initrd.img .

# Rename the initrd
mv initrd.img initrd.ext2.gz

# Unzip the initrd
gunzip initrd.ext2.gz

# Create a blank directory to mount the initrd to
mkdir initrd.dir

# Mount the initrd filesystem
mount initrd.ext2 initrd.dir -o loop

# Investigate your initrd
cd initrd.dir

Inspecting the initrd

When initrd boots, it immediately runs /linuxrc

SCSI modules are located in the /lib directory

console (5,1)
null (1,3)
ram (1,1)
systty (4,0)
tty1 (4,1)
tty2 (4,2)
tty3 (4,3)
tty4 (4,4)

Contents of linuxrc


echo "Loading ncr53c8xx module"
insmod /lib/ncr53c8xx.o 

Repacking the initrd

Previous Web Site Publishing Submit Scripts
Next Configuring Compaq ProLiant Servers without using SmartStart

About author

shibaa987 274 posts

Linux kernel developer and a firmware developer with an experience of 10+ years.

View all posts by this author →

You might also like

System Internals 0 Comments

Basic Operating System Services: A beginner’s guide

This post was last updated on November 3rd, 2020 at 05:20 pmOperating System Services are the basic functionalities or the responsibilities of an Operating System that it provides to the

System Internals 0 Comments

Using Here Documents in Linux

This post was last updated on June 3rd, 2020 at 04:38 pmcat <<EOF>/tmp/newfile This is the contents of the here document It can span multiple lines A here document says

System Internals 0 Comments

Linux Recovery

This post was last updated on June 1st, 2020 at 12:11 pmHere’s another version of recovery.html that I put into the Compaq ProLiant Linux Installation HOWTO version 0.7 March 2001.


No Comments Yet!

You can be first to comment this post!

Leave a Reply