Difference between revisions of "Initrd"

From Linuxintro
imported>ThorstenStaerk
imported>ThorstenStaerk
Line 16: Line 16:
 
= See also =
 
= See also =
 
* [[pXe]]
 
* [[pXe]]
 +
* http://unix.stackexchange.com/questions/89923/how-does-linux-load-the-initrd-image

Revision as of 09:54, 20 August 2014

The Linux boot process will first mount an initial ramdisk to mount the harddisks. This is how you modify an initrd:

mkdir tmp
cd tmp
cp /boot/initrd initrd.gz
gunzip initrd.gz
mkdir tmp2
cd tmp2
cpio -id < ../initrd 

Do the needed changes now in this folder. Then pack the initrd again:

find . | cpio --create --format='newc' > ../newinitrd
cd ..
gzip newinitrd

Your new initrd is now called newinitrd.gz.

See also