Pete Batard
2012-Feb-14 14:05 UTC
[syslinux] [PATCH 3/3] syslinux: support isolinux configuration files
This one is the most critical for my app, but also possibly the most controversial to integrate. A few applications that convert isolinux ISOs to bootable USB, including mine, copy the ISO content to a VFAT formatted partition and then add syslinux to make it bootable. This would work great... if isolinux and syslinux shared the same defaults when it comes to configuration files. Unfortunately, isolinux requires an isolinux.cfg in /boot/isolinux, /isolinux or /, whereas syslinux requires a syslinux.cfg in /boot/syslinux, /syslinux or /. Therefore, my proposal is to add the isolinux config and config dirs to the syslinux searcheable locations, so that the process of bootable ISO -> bootable USB can be made easier. My limited testing with recent Linux image seems to indicate that doing just that works quite well, and thus I plan to use an ldlinux.sys that has been patched in such a way. However, I would prefer if an official ldlinux.sys could be used. I also haven't found a good answer on why isolinux and syslinux require the use of isolated config repositories. I can understand why having separate config directory can be useful for the creation of hybrid images, that work for both disk and ISO, and why they may require different init. But in that case, I don't exactly see why directory precedence rules couldn't be applied: if syslinux then look first in syslinux expected dirs and fallback to isolinux ones, if isolinux than look first in isolinux expected dirs, then fallback to syslinux ones. The only discussion I was able to locate with regards to cfg location was in December 2005, but didn't seem to answer that question. In this patch, the extra config and directories for isolinux are being added after the existing ones (including /) so I believe it should be fairly safe for existing syslinux users. Precedence rules should avoid issues of a syslinux.cfg being overridden by an existing isolinux.cfg whereas that wasn't the case in earlier versions. The only problem I can remotely see is if someone produced weird image with an isolinux.cfg in /syslinux/ but placed their actual syslinux.cfg in / for some reason. But I fail to see why anyone would create an image like that except by mistake, as it wouldn't be bootable as an ISO. Regards, /Pete -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: 0003-syslinux-support-isolinux-configuration-files.patch URL: <http://www.zytor.com/pipermail/syslinux/attachments/20120214/41717395/attachment.ksh>
Thomas Bächler
2012-Feb-14 14:43 UTC
[syslinux] [PATCH 3/3] syslinux: support isolinux configuration files
Am 14.02.2012 15:05, schrieb Pete Batard:> This one is the most critical for my app, but also possibly the most > controversial to integrate. > > A few applications that convert isolinux ISOs to bootable USB, including > mine, copy the ISO content to a VFAT formatted partition and then add > syslinux to make it bootable. > This would work great... if isolinux and syslinux shared the same > defaults when it comes to configuration files.NAK. If we want to unify configuration file names, we first need to unify behaviour: 1) "Working directory" * ISOLINUX: Working directory is /, config file is hardcoded to a restricted set of paths. * SYSLINUX: Working directory is the directory the config file lives, the same where ldlinux.sys lives. * PXELINUX: Working directory is the "prefix", config file is given as a relative path. 2) ".." support: * ISOLINUX: No ".." support in paths * SYSLINUX: ".." in paths supported * PXELINUX: No ".." support in paths When we unified directory structure in the Arch Linux ISO, this caused problems. We now have several "loadconfig" tricks to get a unified configuration: * ISOLINUX: /isolinux/isolinux.cfg: DEFAULT loadconfig LABEL loadconfig CONFIG /arch/boot/syslinux/archiso.cfg APPEND /arch/ (Note that the path /arch/ is hardcoded). * SYSLINUX: Install syslinux in /arch/boot/syslinux/ldlinux.sys, config file /arch/boot/syslinux/syslinux.cfg: DEFAULT loadconfig LABEL loadconfig CONFIG archiso.cfg APPEND ../../ (Note that the path /arch/ is not hardcoded, you can move the toplevel directory anywhere on the medium). * PXELINUX: Directly tell syslinux the right prefix ($TFTPDIR/arch/) and have "boot/syslinux/archiso.cfg" as the configuration file. This was the ONLY way to unify configuration files across all three systems and at the same time use _relative paths_ everywhere. It would have been easier if isolinux and pxelinux had allowed "..". -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 900 bytes Desc: OpenPGP digital signature URL: <http://www.zytor.com/pipermail/syslinux/attachments/20120214/687cec2d/attachment.sig>
Gene Cumm
2012-Feb-14 21:53 UTC
[syslinux] [PATCH 3/3] syslinux: support isolinux configuration files
On Tue, Feb 14, 2012 at 09:05, Pete Batard <pete at akeo.ie> wrote:> This one is the most critical for my app, but also possibly the most > controversial to integrate. > > A few applications that convert isolinux ISOs to bootable USB, including > mine, copy the ISO content to a VFAT formatted partition and then add > syslinux to make it bootable. > This would work great... if isolinux and syslinux shared the same defaults > when it comes to configuration files. > > Unfortunately, isolinux requires an isolinux.cfg in /boot/isolinux, > /isolinux or /, whereas syslinux requires a syslinux.cfg in /boot/syslinux, > /syslinux or /.For building my ISOs, I put a tiny syslinux.cfg in the root directory that INCLUDEs my main config and use paths relative to that (no leading "/"). This allows the same config file on the ISO as the USB and the same LABEL statements in my PXELINUX config files (or I could just INCLUDE the syslinux.cfg or main config). -- -Gene