It would be impossible to create a single kernel binary image that would suit all the hardware configurations out there. Instead, kernel supports the initrd. initrd is a virtual file-system that contains drivers (kernel modules) needed to boot the system. For instance, very often a SCSI controllers drivers reside inside of the initrd. Kernel needs a SCSI controller driver to boot the operating system, but it does not include it, nor it can read it from hard-disk (you’d need a driver for the hard-disk, right?). And this is when the initrd becomes very handy.
To extract the content of initrd file, use the following command:
gunzip < initrd-2.6.31.5-0.1-desktop | cpio -i --make-directories
2 comments:
well, to view --list seems sufficient , according to :
from : http://www.gnu.org/software/cpio/manual/cpio.html
scary :
--make-directories
Create leading directories where needed.
"initrd is a virtual file-system that contains drivers (kernel modules) needed to boot the system" which means it does contains "/" so you would overwrite the filesystem on which you run it , then run for your last backup tape from hopefully not from 1928 :(
i prefer :
--no-absolute-filenames
Create all files relative to the current directory in copy-in mode, even if they have an absolute file name in the archive.
then the nirvana opens up to you ;)
unless your cpio has some other safer options enabled by default .
View modules
gunzip < initrd-2.6.18-308.el5.img | cpio -t | grep "ko" | less
Post a Comment