[syslinux] no menu.c32, no problem...

syslinux at noid.net syslinux at noid.net
Tue May 31 18:38:55 PDT 2005


Fellow syslinux fans,

I'm using syslinux on a boot floppy (I'll call this syslinux A) to
invoke an etherboot image (zlilo style) which invokes a tagged NBI
image from my DHCP/TFTP server.  The tagged NBI image is created using
mknbi-dos and also uses syslinux (I'll call this syslinux B), a linux
kernel and an initrd file.

It works perfectly if syslinux A has a basic .CFG, e.g.:

  PROMPT 0
  TIMEOUT 0
  DEFAULT alldrvrs.lil

In the above example, 'alldrvrs.lil' is the etherboot image.

I run into trouble if syslinux A is configured to use it's menu
capabilities, e.g.:

  DEFAULT menu.c32
  PROMPT 0
  NOESCAPE 1
  MENU TITLE Etherboot Network Boot Disk
  TIMEOUT 50
  ALLOWOPTIONS 0
  LABEL alldrvrs
    MENU DEFAULT
    MENU LABEL Network boot
    KERNEL alldrvrs.lil

In this situation, the etherboot image is invoked just fine and it
successfully TFTP's the tagged NBI image.  I see a message regarding
mknbi and then, before syslinux B comes up, the boot fails and I see
this error message:

  alldrvrs.lil: attempted DOS system call

I am not an assembly language programmer, but after snooping around the
syslinux source a bit, I have a theory as to why this error manifests
itself only when menu.c32 in loaded.

It looks like COMBOOT sets up an interrupt table so that menu.c32 can
do some basic things.  Selecting a menu option triggers 'comapi_run' and
then 'comboot_exit_special' before getting to the non-COMBOOT code.  I
think 'comboot_exit_special' should be cleaning up the interrupt table
that was previously set up, no...?

But instead the table gets left behind and eventually gets tickled by
syslinux B; the 'attempted DOS system call' error occurs when an
unsupported function call is made in COMBOOT's 'int21_table'.

Thanks for your consideration,

- Tor







PS - Here's some gory details (hopefully non-relevant)...

  versions:

    mknbi-1.4.0     # newer seems to have trouble w/ syslinux...?
    syslinux-3.08
    etherboot-5.4.0

  make the tagged NBI image:

    TFTP_ARCHIVE=/tftpboot

    rm -f /tmp/net-boot.img
    drivex='drive x: file="/tmp/net-boot.img"'
    ( grep -v -i "drive.*x:" ~/.mtoolsrc 2>/dev/null ;
      echo "$drivex" ) > ~/.mtoolsrc.new
    mv -f ~/.mtoolsrc.new ~/.mtoolsrc
    mformat -C -t 80 -s 36 -h 2 x:
    mcopy $TFTP_ARCHIVE/pxelinux.cfg/default x:syslinux.cfg
    mcopy $TFTP_ARCHIVE/{vmlinuz,miniroot.gz,boot.msg,logo.16} x:
    syslinux /tmp/net-boot.img # this is bootable as is...

    # make a "tagged" etherboot image from the floppy...
    # this will only be bootable inside etherboot...
    mknbi-dos --rdbase=0x220000 /tmp/net-boot.img >$TFTP_ARCHIVE/etherboot.nbi

  make the syslinux/etherboot floppy:

    # make the etherboot zlilo style image...
    export ETHERBOOT_SRC_DIR=/usr/local/src/etherboot-5.4.0
    ( cd $ETHERBOOT_SRC_DIR/src
      make clean
      perl -p -i -e 's{-DASK_BOOT=3\s+}{}' Config
      DRVS=
      DRIVERS=
      DRVS="      e1000 eepro eepro100 rtl8139 pcnet32 tg3 3c90x 3c509"
      DRVS="$DRVS tulip ne wd natsemi via-rhine w89c840 smc9000 cs89x0"
      DRVS="$DRVS epic100 sis900"
      for d in $DRVS ; do
        DRIVERS="${DRIVERS}--${d}"
      done ; DRIVERS=`echo ${DRIVERS} | sed s/^--//`
      make bin/$DRIVERS.zlilo
      cp -vf bin/$DRIVERS.zlilo /tmp/alldrvrs.lil
      make clean
    )

    # now make the syslinux boot floppy
    export SYSLINUX_SRC_DIR=/usr/local/src/syslinux-3.08
    rm -f /tmp/etherboot.img
    drivex='drive x: file="/tmp/etherboot.img"'
    ( grep -v -i "drive.*x:" ~/.mtoolsrc 2>/dev/null ;
      echo "$drivex" ) > ~/.mtoolsrc.new
    /bin/mv -f ~/.mtoolsrc.new ~/.mtoolsrc
    mformat -C -t 80 -s 18 -h 2 x:
    mcopy $SYSLINUX_SRC_DIR/com32/modules/menu.c32 x:
    mcopy /tmp/alldrvrs.lil x:
    mcopy /tmp/syslinux.cfg x: # as seen above
    ( cd $SYSLINUX_SRC_DIR
      unix/syslinux /tmp/etherboot.img # this is bootable as is...
    )




More information about the Syslinux mailing list