Listing 5. superkick Script
#!/bin/sh
# superkick Created by Ali R B
# Assumes that the initrd.img from the Red Hat
Installation disk is saved
# as initrd.save and the Linux kernel is vmlinuz
cp initrd.save initrd.gz
gunzip initrd.gz
mkdir point
mount -o loop initrd point/
# Place the ks.cfg file for the target machine
in the same directory
# as this script or change the following line
cp ks.cfg point/tmp/
umount point/
rmdir point/
gzip initrd
mv initrd.gz initrd.img
# The /tftpboot directory must exist with world
readable permissions
# This is the command that actually packs
everything nicely.
./mknbi -x -k vmlinuz -r initrd.img -a
"ks initrd=initrd.img network"
-o /tftpboot/kernel
rm initrd.img
Copyright © 1994 - 2019 Linux Journal. All rights reserved.