[syslinux] Patch for chain.c32: Set default boot drive to CD drive from which ISOLINUX is booted

Kim Mik kimmik999999 at yahoo.co.uk
Sun Jul 19 12:14:16 PDT 2009


chain.c32 of SYSLINUX 3.82 does set the boot drive passed to the DL register to 0x80 and not to the boot drive (CD-drive).
This can be a problem if you want to chainload grldr (grub4dos bootloader) from a CD and if you want to let grldr search for its menu.lst file on the CD.

For more info:
http://www.boot-land.net/forums/index.php?showtopic=8457


This 1 line patch fixes the issue (Thanks to hpa, for pointing to the exact location of the problematic code).

Gert Hulselmans


$ diff -u ./com32/modules/chain.c.old ./com32/modules/chain.c.new 
--- ./com32/modules/chain.c.old    2009-07-19 20:33:16.468094540 +0200
+++ ./com32/modules/chain.c.new    2009-07-19 20:26:54.636091513 +0200
@@ -666,8 +666,7 @@
   } else if (!strcmp(drivename, "boot")) {
     const union syslinux_derivative_info *sdi;
     sdi = syslinux_derivative_info();
-    if (sdi->c.filesystem == SYSLINUX_FS_PXELINUX ||
-    sdi->c.filesystem == SYSLINUX_FS_ISOLINUX)
+    if (sdi->c.filesystem == SYSLINUX_FS_PXELINUX )
       drive = 0x80;        /* Boot drive not available */
     else
       drive = sdi->disk.drive_number;


      




More information about the Syslinux mailing list