[syslinux] Patch for chain.c32: Set default boot drive to CD drive from which ISOLINUX is booted
Kim Mik
kimmik999999 at yahoo.co.uk
Thu Jul 23 11:51:04 PDT 2009
Not only grub4dos (grldr) needs the patch to boot correctly after being chainloaded by chain.c32
when run from ISOLINUX.
If you want to boot Windows 2000/XP/2003 , from a CD/DVD with ISOLINUX,
by chainloading SETUPLDR.BIN with chain.c32, chain.c32 needs to pass the
CD drive from which ISOLINUX was booted as root drive to SETUPLDR.BIN.
If you want to boot Windows Vista/2008/7, from a CD/DVD with ISOLINUX,
by chainloading bootmgr with chain.c32, chain.c32 needs to pass the
CD drive from which ISOLINUX was booted as root drive to bootmgr.
isolinux.cfg:
==========================================================================
UI menu.c32
LABEL -
MENU LABEL Boot Windows XP setup (setupldr.bin) with patched chain.c32
TEXT HELP
Boot Windows XP setup (setupldr.bin) with patched chain.c32.
Works.
ENDTEXT
COM32 chain-patched.c32
APPEND ntldr=/I386/SETUPLDR.BIN
LABEL -
MENU LABEL Boot Windows XP setup (setupldr.bin) with original chain.c32 from 3.82
TEXT HELP
Boot Windows XP setup (setupldr.bin) with original chain.c32
Doesn't work.
ENDTEXT
COM32 chain-ori.c32
APPEND ntldr=/I386/SETUPLDR.BIN
LABEL -
MENU LABEL Boot Windows XP setup (setupldr.bin) with original chain.c32
from 3.82 (hd96)
TEXT HELP
Boot Windows XP setup (setupldr.bin) with original chain.c32
and add the bios drive number for the CD drive to the APPEND line.
Works.
ENDTEXT
COM32 chain-ori.c32
APPEND ntldr=/I386/SETUPLDR.BIN hd96
LABEL -
MENU LABEL Boot Windows Vista/7 (bootmgr) with patched chain.c32
TEXT HELP
Boot Windows Vista/7 (bootmgr) with patched chain.c32
Works
ENDTEXT
COM32 chain-patched.c32
APPEND ntldr=/bootmgr
LABEL -
MENU LABEL Boot Windows Vista/7 (bootmgr) with original chain.c32 from 3.82
TEXT HELP
Boot Windows Vista/7 (bootmgr) with original chain.c32
from 3.82
Doesn't work
ENDTEXT
COM32 chain-ori.c32
APPEND ntldr=/bootmgr
LABEL -
MENU LABEL Boot Windows Vista/7 (bootmgr) with original chain.c32
from 3.82 (hd96)
TEXT HELP
Boot Windows Vista/7 (bootmgr) with original chain.c32
from 3.82
and add the bios drive number for the CD drive to the APPEND line.
ENDTEXT
COM32 chain-ori.c32
APPEND ntldr=/bootmgr
=====================================================================
Gert Hulselmans
----- Original Message ----
From: Kim Mik <kimmik999999 at yahoo.co.uk>
To: syslinux at zytor.com
Sent: Sunday, 19 July, 2009 21:14:16
Subject: [syslinux] Patch for chain.c32: Set default boot drive to CD drive from which ISOLINUX is booted
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;
_______________________________________________
Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.
More information about the Syslinux
mailing list