Digging into an initrd File
Updated September 16, 2002
Created August 24, 2001


Autogenerated Site Map
Search this Site!:
Search this site powered by FreeFind



Please refer to rhdiskmod.html for complete information. That page will eventually replace this page.


UNPACK INSPECT REPACK


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


UNPACK INSPECT REPACK


Inspecting the initrd

When initrd boots, it immediately runs /linuxrc SCSI modules are located in the /lib directory bin insmod sash dev console (5,1) null (1,3) ram (1,1) systty (4,0) tty1 (4,1) tty2 (4,2) tty3 (4,3) tty4 (4,4) etc lib ncr53c8xx.o linuxrc loopfs
Contents of linuxrc
#!/bin/sash

aliasall

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



UNPACK INSPECT REPACK


Repacking the initrd



Search this Site!:
Search this site powered by FreeFind

Homepage: http://www.cpqlinux.com
Site Map: http://www.cpqlinux.com/sitemap.html