You may need to edit files inside an initrd. The initrd files found in /boot/ have an .img extension, but they are not disk images. In RHEL5, the initrd .img files are a combination of gzip and cpio. Extract the files inside an initrd w/:
# gunzip -cd /boot/initrd-`uname -r`.img | cpio -idv
This extracts all initrd files for the running kernel image. You can then read/modify files. Re-compress the files to an initrd w/:
# find . | cpio -co | gzip -c9 - > /boot/initrd-`uname -r`-new.img
Deleting an initrd module is simple. Find the driver name file in ./lib and delete it. It should have a .ko extenstion. The utility mkinitrd is only a script to standardize the initrd creation process.
This was info required to cleanup a QLogic driver and utility install that had gone awry.
# gunzip -cd /boot/initrd-`uname -r`.img | cpio -idv
This extracts all initrd files for the running kernel image. You can then read/modify files. Re-compress the files to an initrd w/:
# find . | cpio -co | gzip -c9 - > /boot/initrd-`uname -r`-new.img
Deleting an initrd module is simple. Find the driver name file in ./lib and delete it. It should have a .ko extenstion. The utility mkinitrd is only a script to standardize the initrd creation process.
This was info required to cleanup a QLogic driver and utility install that had gone awry.
Comments