also sprach Andreas B. Mundt <a...@debian.org> [2015-01-30 18:48 +0100]: > * Jonas provided patches in https://bugs.debian.org/759424#57 > * I had to modify Jonas' patch slightly to make it work here: > https://bugs.debian.org/759424#33 > * Jonas disagrees with that modification, the diffence is diskussed in > https://bugs.debian.org/759424#62 from my POV.
I seem to remember that the files are indeed looked up under ./debian-installer/, which would mean Andi's modifications are needed. Right now, I am setting up a fresh install, so let's see what we can make of all your work. FTR, I have TFTPROOT set to /srv/tftp in di-netboot-assistant.conf, and I use atftpd from xinetd like so (as user nobody): in.tftpd --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 \ --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp and I have it all configured so that I don't have to be root (cf. README file). Also, I don't do anything fancy in the DHCP config (cf. #776670), except serving next-server and filename=debian-installer/pxelinux.0 After applying Jonas' five patches and running install, I am left with . ├── debian-installer │ ├── daily │ │ └── i386 │ │ ├── boot-screens │ │ │ ├── […] │ │ ├── initrd.gz │ │ ├── linux │ │ ├── pxelinux.0 │ │ ├── pxelinux.cfg │ │ │ └── default -> ../boot-screens/syslinux.cfg │ │ └── version.info │ ├── pxelinux.0 │ ├── pxelinux.cfg │ │ ├── default │ │ ├── menu.c32 │ │ └── vesamenu.c32 │ └── README.txt ├── ldlinux.c32 ├── libcom32.c32 └── libutil.c32 Unfortunately, PXE does not work. Here are the files requested from the TFTP server: atftpd[12256]: Serving debian-installer/pxelinux.0 to 192.168.17.133:43759 atftpd[12256]: Serving debian-installer/ldlinux.c32 to 192.168.17.133:49152 atftpd[12256]: Serving debian-installer//boot/isolinux/ldlinux.c32 to 192.168.17.133:49153 atftpd[12256]: Serving debian-installer//isolinux/ldlinux.c32 to 192.168.17.133:49154 atftpd[12256]: Serving debian-installer//boot/syslinux/ldlinux.c32 to 192.168.17.133:49155 atftpd[12256]: Serving debian-installer//syslinux/ldlinux.c32 to 192.168.17.133:49156 atftpd[12256]: Serving debian-installer//ldlinux.c32 to 192.168.17.133:49157 So yes, ldlinux.c32 is looked up under debian-installer/ldlinux.c32. So now, let's change the /bin/cp destination, as suggested by Andi. Now the install yields: . └── debian-installer ├── daily │ └── i386 │ ├── boot-screens │ │ ├── […] │ ├── initrd.gz │ ├── linux │ ├── pxelinux.0 │ ├── pxelinux.cfg │ │ └── default -> ../boot-screens/syslinux.cfg │ └── version.info ├── ldlinux.c32 ├── libcom32.c32 ├── libutil.c32 ├── pxelinux.0 ├── pxelinux.cfg │ ├── default │ ├── menu.c32 │ └── vesamenu.c32 └── README.txt The TFTP server now sees the following requests: atftpd[13592]: Serving debian-installer/pxelinux.0 to 192.168.17.133:37488 atftpd[13592]: Serving debian-installer/ldlinux.c32 to 192.168.17.133:49152 atftpd[13592]: Serving debian-installer/pxelinux.cfg/4274295f-9f3c-4e8b-8c6a-166b2f0241d1 to 192.168.17.133:49153 atftpd[13592]: Serving /debian-installer/pxelinux.cfg/menu.c32 to 192.168.17.133:49164 atftpd[13592]: Serving debian-installer/libutil.c32 to 192.168.17.133:49165 atftpd[13592]: Serving debian-installer/pxelinux.cfg/default to 192.168.17.133:49166 and the menu is shown and installation works! So to this point, I have to say that Andi's modification seems necessary. > * I sent some minor improvement patches in > https://bugs.debian.org/759424#67 and > https://bugs.debian.org/759424#72 Both of these patches make sense to have included and work just fine, mainly because Andi's original patch doesn't apply anymore (Jonas included some changes). Attached is the combined patch against di-n-a which I tested. The di-sources.list patch (the last one) applies fine So my verdict: I think Jonas patches fix a good chunk of the problems, but Andi's modification is required. His other patches also make sense and can/should be included, even for a jessie release. And yes, I think it would be better to fix this for jessie than to leave it as is, or remove the package. This is a package used by hardcore sysadmins only anyway, so I think it's okay to run the risk and simply expect them to use a backport later if there are some bugs we didn't see or introduce here. -- .''`. martin f. krafft <madduck@d.o> @martinkrafft : :' : proud Debian developer `. `'` http://people.debian.org/~madduck `- Debian - when you have better things to do than fixing systems
--- /tmp/di-netboot-assistant 2015-01-30 21:49:56.480240446 +0100 +++ /usr/bin/di-netboot-assistant 2015-01-30 22:16:56.650858509 +0100 @@ -200,12 +200,13 @@ # ------------------------------------------------------------ # # find_file() # Return the name of the first file matching criteria. -# Parameters: dir name +# Parameters: name dir [dir...] # Returns: (STRING) file # ------------------------------------------------------------ # find_file() { if [ "$1" -a "$2" ]; then - find "$2" -type f -name $1 | head -n 1 + local name=$1; shift + find "$@" -type f -name "$name" | head -n 1 else echo "" fi @@ -241,7 +242,14 @@ [ ! "$src" -o ! "$dst" ] && return 1 - newbin=$(find_file pxelinux.0 "$src" 2>/dev/null) + if [ "$SYSLINUX" = "$src" ]; then + # avoid recent SYSLINUX EFI binaries incompatible with PXELINUX + [ ! -d "$src/modules/bios" ] || src="$src/modules/bios" + # recent SYSLINUX ships PXELINUX at separate location + newbin=$(find_file pxelinux.0 /usr/lib/PXELINUX "$SYSLINUX" 2>/dev/null) + else + newbin=$(find_file pxelinux.0 "$src" 2>/dev/null) + fi [ ! -f "$dst/pxelinux.0" -a ! -f "$newbin" ] && return 1 pxe_new_ver="$(pxelinux_version "$newbin")" @@ -253,7 +261,11 @@ echo "I: Upgrading PXELinux ($pxe_cur_ver to $pxe_new_ver)" for f in pxelinux.0 menu.c32 vesamenu.c32; do - srcf="$(find_file $f "$src")" + if [ pxelinux.0 = "$f" ]; then + srcf="$newbin" + else + srcf="$(find_file $f "$src")" + fi [ "${f#*c32}" ] || f="pxelinux.cfg/$f" [ -L "$dst/$f" ] && rm "$dst/$f" if [ -f "$srcf" ]; then @@ -264,6 +276,13 @@ done # Smooth transition to vesamenu [ ! -f "$c32_dir/menu.c32" ] && ln -s "vesamenu.c32" $c32_dir/menu.c32 + # Add core modules at root (see <https://bugs.debian.org/756275#49>) + if [ "$TFTP_ROOT/debian-installer/" = "$dst" ]; then + for f in ldlinux.c32 libcom32.c32 libutil.c32; do + srcf="$(find_file $f "$src")" + [ -z "$srcf" ] || cp -np "$srcf" "$TFTP_ROOT/debian-installer/$f" + done + fi return 0 } @@ -373,7 +392,7 @@ if [ -f pxelinux.cfg/default ]; then for x in $(sed -n -e "s,^\s*KERNEL\s[\s:/]*\(.*menu.c32\).*,\1,p " pxelinux.cfg/default | sort -u ); do - [ ! -f ../$x ] && echo "W: Some menu binaries are missing. Install the package syslinux" + [ ! -f ../$x ] && echo "W: The binary '${TFTP_ROOT}/$x' mentioned in the PXE boot menu is missing." done else find pxelinux.cfg/ -iregex '.*\(\.c32\|\.bak.*\|~\)$' \ @@ -907,6 +926,21 @@ if ! copy_syslinux_bin "$expand_dir" "$TFTP_ROOT/debian-installer/" ; then echo "E: No PXELinux menu installed. Please file a bug." 1>&2 fi + # ensure only a single PXELINUX version is used for all its modules + for f in $(find "$expand_dir" -type f -name '*.c32'); do + case $(basename "$f") in + vesamenu.c32|menu.c32) + cp -pft "$(dirname "$f")" "$TFTP_ROOT/debian-installer/pxelinux.cfg/$(basename "$f")" + ;; + ldlinux.c32|libcom32.c32|libutil.c32) + cp -pft "$(dirname "$f")" "$TFTP_ROOT/debian-installer/$(basename "$f")" + ;; + *) + echo "W: Unusual PXELINUX module \"$f\" may not work." 1>&2 + continue + ;; + esac + done for f in $(find "$expand_dir" -type f -a \( -name "default" -o -name "boot.txt" -o -name '*.cfg' \) ); do mv "$f" "$f.ORIG"
digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/sig-policy/999bbcc4/current)