Difference between revisions of "Initrd"

From Linuxintro
imported>ThorstenStaerk
(Created page with "This is how you modify an initrd: mkdir tmp cd tmp cp ../initrd ./initrd.gz gunzip initrd.gz mkdir tmp2 cd tmp2 cpio -id < ../initrd Do the needed changes now in this...")
 
imported>ThorstenStaerk
Line 7: Line 7:
 
  mkdir tmp2
 
  mkdir tmp2
 
  cd tmp2
 
  cd tmp2
  [[cpio]] -id < ../initrd
+
  [http://linux.die.net/man/1/cpio cpio] -id < ../initrd  
 
Do the needed changes now in this folder. Then pack the initrd again:
 
Do the needed changes now in this folder. Then pack the initrd again:
 
  [[find]] . | cpio --create --format='newc' > ../newinitrd
 
  [[find]] . | cpio --create --format='newc' > ../newinitrd

Revision as of 09:24, 20 August 2014

This is how you modify an initrd:

mkdir tmp
cd tmp
cp ../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