SYSLINUX=$IMGPATH/usr/bin/syslinux if [ ! -f $SYSLINUX ]; then echo "$SYSLINUX doesn't exist" exit 1 fi prepareBootImage() { dd if=/dev/zero bs=1k count=$BOOTDISKSIZE of=/$MBD_TMPIMAGE 2>/dev/null mkdosfs -r 16 -C $MBD_TMPIMAGE $BOOTDISKSIZE >/dev/null $SYSLINUX $MBD_TMPIMAGE mount -o loop -t msdos $MBD_TMPIMAGE $MBD_BOOTTREE prepareBootTree } # prepare a directory with the kernel, initrd, and various message files # used to populate a boot image prepareBootTree() { (cd $BOOTDISKDIR; find . ! -name "*.msg" -maxdepth 1 ! -type d | cpio --quiet -p $MBD_BOOTTREE) cp $MBD_FSIMAGE $MBD_BOOTTREE/initrd.img cp $KERNELROOT/boot/vmlinuz-* $MBD_BOOTTREE/vmlinuz pngtopnm $BOOTDISKDIR/syslinux-splash.png | ppmtolss16 \#000000=0 \#c4c7ce=7 \#c60000=2 \#ffffff=15 \#7790c2=9 > $BOOTDISKDIR/splash.lss cp $BOOTDISKDIR/splash.lss $MBD_BOOTTREE/splash.lss rm -f $MBD_BOOTTREE/syslinux-splash.png if [ -d $BOOTDISKDIR/$BOOTLANG ]; then # fb console and kon don't get along... if [ "$BOOTLANG" = "ja_JP" ]; then sed -e "s/ vga=[0-9]*//g" < $MBD_BOOTTREE/syslinux.cfg > $MBD_BOOTTREE/syslinux.cf2 mv -f $MBD_BOOTTREE/syslinux.cf2 $MBD_BOOTTREE/syslinux.cfg fi if [ -n $BOOTDIR ]; then sed -e "s/initrd.img/initrd.img lang=$BOOTDIR/g" < $MBD_BOOTTREE/syslinux.cfg > $MBD_BOOTTREE/syslinux.cf2 mv -f $MBD_BOOTTREE/syslinux.cf2 $MBD_BOOTTREE/syslinux.cfg fi for file in $BOOTDISKDIR/$BOOTLANG/*.msg; do filename=`basename $file` sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename done if [ $? != 0 ]; then echo $0: Failed to copy messages from $BOOTDISKDIR/$BOOTLANG to $MBD_BOOTTREE. umount $MBD_BOOTTREE rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE exit 1 fi else for file in $BOOTDISKDIR/*.msg; do filename=`basename $file` sed -e "s/@VERSION@/$VERSION/g" $file > $MBD_BOOTTREE/$filename done if [ $? != 0 ]; then echo $0: Failed to copy messages from $BOOTDISKDIR to $MBD_BOOTTREE. umount $MBD_BOOTTREE rm -rf $MBD_BOOTTREE $MBD_TMPIMAGE exit 1 fi fi } mkdir -p $TOPDESTPATH/images cat > $TOPDESTPATH/images/README < $TOPDESTPATH/images/pxeboot/README <