Executing the following against a msdosfs slice (/dev/ada0s1) fails # syslinux -i -f /dev/ada0s1 syslinux: failed to create ldlinux.c32 Is seems impossible to perform syslinux installs with the current release of the syslinux port 6.02 - it used work the last time I needed it - at syslinux 6.0 or 6.01
State Changed From-To: open->feedback Tested on 10.0p3-amd64, reproduced the problem
This port has no maintainer, so I guess somebody needs to come up with a patch.
Created attachment 147790 [details] syslinux.patch
The attached patch solved the problem reported here
Created attachment 147791 [details] syslinux.patch
Previous patch did not apply clean - fixed
Would someone be so kind to take a look at this patch - I believe that this case is in "patch ready state" Executive summary: previous maintainer did an error in the ports adaption patches - effectively creating the problem that I reported - this is now fixed with the current change. I'm stepping up to maintain this port - if that can speed things up :-)
Testing linux patches is not easy for me, but it's a minimal patch and uffe has some credibility. He's requested maintainership, so in addition to applying the patch, the MAINTAINER needs to be updated and from what I can tell, the PORTREVISION needs to be bumped in addition to the patch. Moving to the patch-ready pool for a more thorough review...
How to test: Despite the name of this port (syslinux) - no linux is actually required in order to test this patch. Background: syslinux is a boot menu (manager) ala grub - just without the ugly syntax On DOS partitions it installs a stage1 boot loader file "ldlinux.sys" into the filesystem root - it is hooked into the PBR (partition boot record). A stage2 (com32) boot loader called "ldlinux.c32" is also installed into the filesystem root - this installation (of ldlinux.c32) fails with the current port. The attached patch fixes that issue. Here is a quick "before-and-after-patch" test-case: Make sure that you have the mtools (emulators/mtools) package installed. All you need is a FreeBSD root access, an usb-stick or similar media that can be manipulated for test purposes - in other words no valuable data should be on that media. The rest of this text assumes that device /dev/da0 and slice-partition /dev/da0s1 identifies the USB device that testing is to be carried out on. 1) Create a MBR-style partition table on the usb stick (da0) - use your favourite partitioning tool - fdisk, gpart etc 2) Create a MSDOS partition (slice) on the usb stick (da0) - use your favourite partitioning tool - fdisk, gpart etc 3) Create a MSDOS filesystem on the newly created partition (da0s1) - command: newfs_msdos /dev/da0s1 4) Display newly created (empty) MSDOS filesystem - run: # mdir -a -i /dev/da0s1 5) before applying my patch to syslinux - running the following command: # syslinux -i -f /dev/da0s1 Results in error message: syslinux: failed to create ldlinux.c32 6) run: # mdir -a -i /dev/da0s1 shows that only ldlinux.sys is copied to root of the MSDOS filesystem - ldlinux.c32 is not seen 7) after applying my patch to syslinux - running the following command: # syslinux -i -f /dev/da0s1 Completes without error 8) rerun: # mdir -a -i /dev/da0s1 should show that now both ldlinux.sys and ldlinux.c32 is copied to root of MSDOS filesystem. 9) Done.
There is a newer version of syslinux (6.03) around. Would you provide a patch that also does the 6.02 -> 6.03 ? I'd test it and commit it ? And thanks for the wonderful explaination!
Hello, Yes I'll be happy to provide an update to syslinux 6.03. But with my current workload at $work - I may need some weeks for proper testing etc. With that in mind I wonder if we could put this patch "into production" until then ?
A commit references this bug: Author: pi Date: Mon Oct 13 10:22:19 UTC 2014 New revision: 370762 URL: https://svnweb.freebsd.org/changeset/ports/370762 Log: sysutils/syslinux: fix bug, give maintainer to submitter PR: 187910 Submitted by: uffe@uffe.org Changes: head/sysutils/syslinux/Makefile head/sysutils/syslinux/files/patch-libinstaller-syslinux.h
Committed to syslinux in version 6.02, thanks!