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 268 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

The Concept Of RAID

This post was last updated on August 3rd, 2020 at 01:50 pmOriginally the term RAID defined as “Redundant Array of Inexpensive Disks” but now it is referred to as “Redundant

System Internals 0 Comments

Drivers in Linux

This post was last updated on May 26th, 2020 at 10:43 pm Contents0.1 What to do with static drivers, module drivers, append=, and insmod.0.2 Drivers in Linux can take on

System Internals 0 Comments

Linux Loop Devices

This post was last updated on November 3rd, 2020 at 06:14 pmBy default you have 8 loop devices (loop0 – loop7). You can extend this number up to 255 (maybe


No Comments Yet!

You can be first to comment this post!

Leave a Reply