Digging into an initrd File

Digging into an initrd File


This post was last updated on May 27th, 2020 at 05:23 pm

Please refer to rhdiskmod.html 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

Sibananda Sahu
Sibananda Sahu 187 posts

A Linux Kernel Developer and a Firmware Developer by profession. Have worked with few big companies: BROADCOM Corporation, Cypress Semiconductor, LSI Corporation, TOSHIBA Corporation, Western Digital; on various cutting edge technologies and product lines, such as: RAID storage Driver, SSD Firmware, WLAN Firmware etc. Having more than 9 years of experience in Software Engineering domain. Now, took a pledge to educate all aspirant students to teach about Linux Kernel Development.

View all posts by this author →

You might also like

System Understanding 0 Comments

Linux and Memory

This post was last updated on May 26th, 2020 at 10:10 pmContents1 Determining if your entire memory is being detected:2 Specifying Undetected Memory – Method #12.0.1 The following format is

System Understanding 0 Comments

Linux /dev Entries

This post was last updated on June 1st, 2020 at 11:57 amLocated here is a listing of the /dev directory. I have posted this information since you may not always

System Understanding 0 Comments

Difference Between MBR And GPT

Large storage disks usually have logical partitions. An Operating System uses a partition table to identify the start address, filesystem information, and other details of a specific logical partition. The


No Comments Yet!

You can be first to comment this post!

Leave a Reply