[syslinux] [menu] Bug: 'cm' is used before it is initialized

CKSoon cksoon79 at yahoo.com
Mon Aug 17 00:01:08 PDT 2009


Hi Peter,

Thanks for looking into this.

The following is a sample configuration file that I've tried (direct copy from the configuration file of clonezilla).

Please take note that the problem is not always reproducible on all system. I've tried the same configuration file on a system with legacy BIOS and the menu displayed well; however, the same configuration file fails on another system with EFI BIOS. I've verified that cm is NULL on both system but due to the difference in interrupt vector table on both system, it make the problem surface on one system but not the other.

- Keng Soon -

~~~~~~~~~~~~~~ Config file : isolinux.cfg ~~~~~~~~~~ start ~~

# Created by generate-pxe-menu! Do NOT edit unless you know what you are doing! 
# Keep those comment "MENU DEFAULT" and "MENU HIDE"! Do NOT remove them.
# Note!!! If "serial" directive exists, it must be the first directive
default vesamenu.c32
timeout 300
prompt 0
noescape 1
MENU MARGIN 5
 MENU BACKGROUND ocswp.png
# Set the color for unselected menu item and timout message
 MENU COLOR UNSEL 7;32;41 #c0000090 #00000000
 MENU COLOR TIMEOUT_MSG 7;32;41 #c0000090 #00000000
 MENU COLOR TIMEOUT 7;32;41 #c0000090 #00000000
 MENU COLOR HELP 7;32;41 #c0000090 #00000000

# MENU MASTER PASSWD

say **********************************************************************
say Clonezilla, the OpenSource Clone System.
say NCHC Free Software Labs, Taiwan.
say clonezilla.org, clonezilla.nchc.org.tw
say THIS SOFTWARE COMES WITH ABSOLUTELY NO WARRANTY! USE AT YOUR OWN RISK! 
say **********************************************************************

# Allow client to edit the parameters
ALLOWOPTIONS 1

# simple menu title
MENU TITLE clonezilla.org, clonezilla.nchc.org.tw

# Since no network setting in the squashfs image, therefore if ip=frommedia, the network is disabled. That's what we want.
label Clonezilla live
  MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (Default settings, VGA 1024x768)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" mode_option=1024x768 ip=frommedia 
  TEXT HELP
  * Clonezilla live version: 20090812-jaunty. (C) 2003-2009, NCHC, Taiwan
  * Disclaimer: Clonezilla comes with ABSOLUTE NO WARRANTY
  ENDTEXT

label Clonezilla live 800x600
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (Default settings, VGA 800x600)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" mode_option=800x600 ip=frommedia 
  TEXT HELP
  VGA mode 800x600. OK for most of VGA cards.
  ENDTEXT

label Clonezilla live 640x480
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (Default settings, VGA 640x480)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" mode_option=640x480 ip=frommedia 
  TEXT HELP
  VGA mode 640x480. OK for most of VGA cards.
  ENDTEXT

label Clonezilla live (To RAM)
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (To RAM. Boot media can be removed later)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" noprompt mode_option=1024x768 toram=filesystem.squashfs ip=frommedia 
  TEXT HELP
  All the programs will be copied to RAM, so you can
  remove boot media (CD or USB flash drive) later
  ENDTEXT

label Clonezilla live without framebuffer
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (Safe graphic settings, vga=normal)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" ip=frommedia vga=normal
  TEXT HELP
  Disable console frame buffer support
  ENDTEXT

label Clonezilla live failsafe mode
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Clonezilla live (Failsafe mode)
  # MENU PASSWD
  kernel /live/vmlinuz1
  append initrd=/live/initrd1.img boot=live union=aufs  hostname=jaunty edd=on nolocales ocs_live_run="ocs-live-general" ocs_live_extra_param="" ocs_live_keymap="" ocs_live_batch="no" ocs_lang="" acpi=off irqpoll noapic noapm nodma nomce nolapic nosmp ip=frommedia vga=normal
  TEXT HELP
  acpi=off irqpoll noapic noapm nodma nomce nolapic 
  nosmp vga=normal
  ENDTEXT

label local
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Local operating system in harddrive (if available)
  # MENU PASSWD
  # 2 method to boot local device:
  # (1) For localboot 0, it is decided by boot order in BIOS, so uncomment the follow 1 line if you want this method:
  # localboot 0

  # (2) For chain.c32, you can assign the boot device.
  # Ref: extlinux.doc from syslinux
  # Syntax: APPEND [hd|fd]<number> [<partition>]
  # [<partition>] is optional.
  # Ex:
  # Second partition (2) on the first hard disk (hd0);
  # Linux would *typically* call this /dev/hda2 or /dev/sda2, then it's "APPEND hd0 2"
  #
  kernel chain.c32
  append hd0
  TEXT HELP
  Boot local OS from first hard disk if it's available
  ENDTEXT

MENU BEGIN Memtest & FreeDOS

# Note! *.bin is specially purpose for syslinux, 
# Do NOT use memtest.bin, use memtest instead of memtest.bin
label memtest
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Memory test using Memtest86+
  # MENU PASSWD
  kernel /live/memtest
  TEXT HELP
  Run memory test using Memtest86+
  ENDTEXT

label FreeDOS
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL FreeDOS
  # MENU PASSWD
  kernel memdisk
  append initrd=/live/freedos.img
  TEXT HELP
  Run FreeDOS
  ENDTEXT

MENU END
MENU BEGIN Network Boot

label etherboot
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Network boot via etherboot
  # MENU PASSWD
  kernel /live/eb.zli
  TEXT HELP
  Run Etherbot to enable network (PXE) boot
  ENDTEXT

label gPXE
  # MENU DEFAULT
  # MENU HIDE
  MENU LABEL Network boot via gPXE
  # MENU PASSWD
  kernel /live/gpxe.lkn
  TEXT HELP
  Run gPXE to enable network (PXE) boot
  ENDTEXT

MENU END

~~~~~~~~~~~~~~ Config file : isolinux.cfg ~~~~~~~~~~ end ~~

--- On Mon, 8/17/09, H. Peter Anvin <hpa at zytor.com> wrote:

> From: H. Peter Anvin <hpa at zytor.com>
> Subject: Re: [syslinux] [menu] Bug: 'cm' is used before it is initialized
> To: "For discussion of Syslinux and tftp-hpa" <syslinux at zytor.com>
> Cc: cksoon79 at yahoo.com
> Date: Monday, August 17, 2009, 2:46 PM
> On 08/16/2009 06:26 PM, CKSoon
> wrote:
> > 
> > I'm seeing the problem on syslinux 3.82 and I believe
> the problem exists in some previous versions. I've tried
> syslinux 3.54 which doesn't have the following code and it
> manage to show the menu correctly. Sample of the menu
> configuration file I used: http://clonezilla.org/.
> > 
> 
> Could you send an actual configuration file?
> 
> I will definitely look into this, but it really helps if I
> have a test case.
> 
>     -hpa
> 
> 
> -- 
> H. Peter Anvin, Intel Open Source Technology Center
> I work for Intel.  I don't speak on their behalf.
> 
> 


      




More information about the Syslinux mailing list