[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#756275: debian-installer: [PATCH] Fix lib location and search path for syslinux >= 5



Package: debian-installer
Severity: important

Hi,

As discussed on #-boot, here's a minimal patch to fix pxeboot with the
current daily images.

This patch possibly also means you can close #750586 and several of
the other bugs referenced there, but my secret decoder ring broke
trying to figure out what his real problem(s) were, so I've kept
this separate to that.

And this bug is unversioned, since it only effects the daily snapshots
after the syslinux update, and the last tagged release was before that.


On a slight tangent to this:

I do wonder a little if we ought to rearrange the netboot.tar tree a
bit in the light of this change, since we basically have 3 things there
with varying degrees of interdependence between both themselves and
alternative images that people might want to boot from the same tftpd.

 - pxelinux.0 (and its associated .c32 binaries)

   Since the commonly used way to boot multiple images is to share
   this between all of them and then use a custom top level menu to
   select the actual tree to boot from, but the .c32 binaries that
   we embed in $arch/boot-screens aren't compatible with different
   syslinux versions of pxelinux.0.

   So possibly we should pull all the .c32 files out of boot-screens
   (and possibly out of $arch too, since they are now all 32-bit ELF
   executables even for amd64), and put them in their own tree where
   they can easily be shared and be from the same syslinux version.

 - the menu .cfg files

   Which should always be compatible with newer versions of vesamenu.c32
   and really only change when different options are added.  They only
   depend on a particular kernel and initrd to the extent of:
   - the path they expect to find them at
   - the options they append for the installer in the initrd.

   In theory, some of these at least could be arch independent, since
   it's only the hardcoded paths to the kernel images that make them
   not so, and the options they append which may make them release
   dependent.

   So possibly these should be split between 'release' and 'arch'
   dirs (unless there's some way to make $arch a runtime variable
   in which case they may could all be just release dependent.

 - the kernel and initrd images

   Which are obviously arch dependent, but could be updated
   independently of the menu files for point releases etc.

Anyhow, the above is really a separate 'bug', if it's a bug at all,
but I figured I'd mention it here since it is relevant in the context
of the incompatible change to syslinux which this bug is about.  I'll
leave it to you guys to decide whether it should be cloned as such,
taken to the list for Further Discussion, or /dev/null'd as SEP :)


  Cheers,
  Ron
>From f3da11a7063ebc4719e5c2b829ac04dc10fb147f Mon Sep 17 00:00:00 2001
From: Ron <ron@debian.org>
Date: Mon, 28 Jul 2014 19:29:45 +0930
Subject: [PATCH] Fix lib location and search path for syslinux >= 5

The changes in b03b133efece84a1f81e41385200ef26e8287cfd were not
sufficient for pxelinux in the netboot tarball to actually boot.
The ldlinux.c32 loader must be located in the tftp root, and the
other new support libraries (libcom32 and libutil) must either be
located there too or have a PATH set to where they can be found.
---
 build/boot/x86/syslinux.cfg | 2 ++
 build/config/x86.cfg        | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/build/boot/x86/syslinux.cfg b/build/boot/x86/syslinux.cfg
index 21dc753..7b2a1ce 100644
--- a/build/boot/x86/syslinux.cfg
+++ b/build/boot/x86/syslinux.cfg
@@ -1,4 +1,6 @@
 # D-I config version 2.0
+# search path for the c32 support libraries (libcom32, libutil etc.)
+path ${SYSDIR}
 include ${SYSDIR}menu.cfg
 default ${SYSDIR}vesamenu.c32
 prompt 0
diff --git a/build/config/x86.cfg b/build/config/x86.cfg
index 456314f..07f99b8 100644
--- a/build/config/x86.cfg
+++ b/build/config/x86.cfg
@@ -391,6 +391,9 @@ arch_netboot_dir: x86_syslinux
 	# dhcp server setups to work without modification.
 	rm -f $(TEMP_NETBOOT_DIR)/pxelinux.0
 	ln -sf $(NETBOOT_PATH)/pxelinux.0 $(TEMP_NETBOOT_DIR)/pxelinux.0
+	# This link is required because pxelinux only looks in the tftp root
+	# for this library (it does a PATH search for any others).
+	ln -sf $(NETBOOT_PATH)/$(BOOT_SCREEN_DIR)/ldlinux.c32 $(TEMP_NETBOOT_DIR)/ldlinux.c32
 
 	set -e; \
 	$(foreach file,$(wildcard $(TEMP_BOOT_SCREENS)/*.txt), \
-- 
2.0.0


Reply to: