[syslinux] menu.c32: not a COM32R image
Marc Pascual
marc.m.pascual at gmail.com
Mon Mar 11 00:18:26 PDT 2013
Hello,
I have a simple shell script that I use to generate an iso installer
depending on the release version that I want. The thing is that I extract
isolinux and menu.c32 from the syslinux rpm of the latest redhat release.
The reason I am doing it this way is because of the
This is what does it:
copymenu32() {
# $ cat /local/kickstart/templates/os-updates.txt
# RedHat-5.8|20120425
# RedHat-5.9|20130305
# RedHat-6.2|20120425
# RedHat-6.3|20120827
# RedHat-6.4|20130228
OSREL="`grep ^RedHat /local/kickstart/templates/os-updates.txt | sort
-n | tail -1 | awk -F'|' '{print $1}'`"
DEST=$2
PWD=`pwd`
SYSLINUX_RPM=`find /local/yum-repo/OS/${OSREL}-x86_64/base -name
'syslinux-*.x86_64.rpm' | egrep 'syslinux-[[:digit:]]'`
SYSLINUX_PATH=`rpm -qpl $SYSLINUX_RPM | grep -w menu.c32 | xargs
dirname`
SYSLINUX_TMPDIR=`mktemp -d /tmp/syslinux.XXXXXX`
cd $SYSLINUX_TMPDIR
rpm2cpio $SYSLINUX_RPM | cpio -idm .${SYSLINUX_PATH}/menu.c32
rpm2cpio $SYSLINUX_RPM | cpio -idm .${SYSLINUX_PATH}/isolinux.bin
cp -f .${SYSLINUX_PATH}/menu.c32 $DEST
cp -f .${SYSLINUX_PATH}/isolinux.bin $DEST
cd $PWD
rm -rf $SYSLINUX_TMPDIR
}
createiso() {
TYPE=$1
if [ $TYPE == "rescue" ]; then
CONFIG="/local/kickstart/templates/isolinux-${OS}-rescue.cfg"
ISOFILE="${HOST}-rescue.iso"
# KS="/local/kickstart/ks/${HOST}-rescue.ks"
else
CONFIG="/local/kickstart/templates/isolinux-${OS}-${MAJOR}.cfg"
ISOFILE="${HOST}.iso"
# KS="/local/kickstart/ks/${HOST}.ks"
fi
MAJOR=`echo $REL | awk -F. '{print $1}'`
ISODIR=`mktemp -d /tmp/iso.XXXXXX`
MKISOFSLOG=`mktemp /tmp/mkisofs.XXXX`
cp -r /local/yum-repo/OS/${OS}-${REL}-x86_64/base/isolinux $ISODIR
chmod -R u+w $ISODIR
/bin/rm -f $ISODIR/isolinux/isolinux.cfg
copymenu32 "${OS}-${REL}" "$ISODIR/isolinux"
copymemtest "$ISODIR/isolinux"
populate $CONFIG $ISODIR/isolinux/isolinux.cfg
cd $ISODIR
if [ -f "/local/kickstart/boot-isos/$ISOFILE" ]; then
mv -f /local/kickstart/boot-isos/$ISOFILE
/local/kickstart/boot-isos/${ISOFILE}.prev
fi
mkisofs -input-charset iso-8859-1 -log-file $MKISOFSLOG -J -T -o
/local/kickstart/boot-isos/$ISOFILE -b isolinux/isolinux.bin -c isolinux/
boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -v .
if [ $? -ne 0 ] ; then
echo "Creation of boot ISO failed"
echo "Check the log file: $MKISOFSLOG"
echo "or check the build directory: $ISODIR"
exit 1
fi
/bin/rm -rf $ISODIR $MKISOFSLOG
HOSTNAME=`uname -n`
MYIP=`gethostip -d $HOSTNAME`
echo "Boot from http://$MYIP/kickstart/boot-isos/$ISOFILE with"
echo "vm cdrom insert http://$MYIP/kickstart/boot-isos/$ISOFILE"
echo "vm cdrom set boot_once"
echo "vm cdrom get"
echo "power reset"
}
I was assuming that I'm good as long as I use isolinux and menu.c32 from
the same package. Now I'm not too sure anymore.
I got varying results. Last week, I was only copying menu.c32 from the rpms
(I used isolinux.bin from the DVD installer). One of the users reported to
me the problem, I spent a few hours on it and I still couldn't figure it
out, and ended up using syslinux from the newly-released RHEL 6.4 ().
Tested builds RHEL 5.6 to 6.4, checked menu.c32 checksum (i checked
isolinux.bin's as well, but it seems its checksum is always changing after
mkisofs), isolinux is going through, all were good.
I'm using syslinux-4.02-8.el6.x86_64.rpm.
Today when I was about to rebuild a server, I'm getting the "menu.c32: not
a COM32R image" message. I'm pretty sure nothing has changed (syslinux rpm,
the script), but I'm not sure where to begin troubleshooting anymore. Can
anyone give me a clue?
regards,
Marc
More information about the Syslinux
mailing list