How to edit RAM disk images
I really want to read more about how this nash/lvm stuff works on my server…
Editing Ramdisks (initrds)
Following are the steps that enable one to edit a ramdisk for any changes:
gunzip -c /boot/initrd-.img >initrd.img
mkdir tmpDir
mount -o loop initrd.img tmpDir/
cd tmpDir
- Make all necessary changes (copy over modules, edit linuxrc etc)
umount tmpDir
gzip -9c initrd.img >/boot/initrd-.img
(stolen from http://openssi.org/cgi-bin/view?page=docs2/1.2/README.edit-ramdisk )
Follow-up
At some point, they stopped making them loopback ISOs and now they are just a compressed cpio
archive:
mkdir initrd cd initrd/ gzip -dc /boot/initrd-2.6.23-0.104.rc3.fc8.img | cpio -id
The cpio is in the "new" format, so when recompressing, you need to use --format='newc'
.
(stolen from http://fedoraproject.org/wiki/KernelCommonProblems )
Comments
No comments.