I am trying to make a RHEL 5.1 installer that runs from a USB flash drive. I would like to place a kickstart file in the install system's root directory, so that I may use it with ks=file:/ks.cfg. I understand that I must modify the contents of the initrd.img located in the <RHEL 5.1 CD>/images/diskboot.img.
I found a few websites that say initrd.img is a gzipped ext2 filesystem. They give the following procedure for opening initrd.img:
# gzip -dc /mnt/boot/initrd.img >/tmp/initrd.ext2
# mkdir /mnt/initrd
# mount -o loop /tmp/initrd.ext2 /mnt/initrd
However, I have had no success with this. gzip does successfully decompress the file, but when I attempt to mount it, mount does not recognize the filesystem type. When I specify the filesystem type as ext2 with
# mount -t ext2 -o loop /tmp/initrd.ext2 /mnt/initrd
the output suggests that I may have a bad superblock. (Sorry, but I'm not able to reproduce the exact output at the moment.)
Can anyone please shed some light on my problem? Thank you very much.