reinstall menu option grub

So I have a couple of machine's I'm reinstalling on a regular basis as part of some on going work. Unfortunately PXE booting is not an option for them so it been a process of attaching a virtual CDROM image and then typing in a bunch of kickstart parameters at the boot menu. Well had enough, time to be a better way. I'm aware of the "remote control" for anaconda so it was time to make it work for me.

OK here's how, I put a little script together to grab the images I need form the build server, setup the grub menu with a reinstall option that has all my parameters already in the place, great much less typing.

# make_remote_install
# retrive anaconda kernel and create grub entry off remote
# reinstall
MYIP=`/sbin/ifconfig eth0 | grep "inet addr" | cut -d: -f2 | cut -d' ' -f1`
GATEWAY=`echo ${MYIP} | cut -d. -f1-3`.254
wget -O ${BOOT}/vmlinuz_remote http://${KSSERVER}/${ISO}/isolinux/vmlinuz
wget -O ${BOOT}/initrd_remote.img http://${KSSERVER}/${ISO}/isolinux/initrd.img

echo "title Remote Install" >> ${GRUBCONF}
echo " root (hd0,0)" >> ${GRUBCONF}
echo " kernel /vmlinuz_remote ksdevice=eth0 ks=http://${KSSERVER}/ks_oel55.cfg ip=${MYIP} netmask=${NETMASK} gateway=${GATEWAY}" >> ${GRUBCONF}
echo " initrd /initrd_remote.img" >> ${GRUBCONF}

So this is particular setup it's using OEL 5.5 but of course this works on similar distro's and I have presumed a bunch of network stuff like gateway and netmask which I know to be always correct for my environment. Console access is not an issue either so I didn't need to go for the vnc option. So add this to the end of your kickstart script to prepare for the next kickstart.