On Mon, Dec 3, 2018 at 10:02 AM Ady Ady via Syslinux <syslinux at zytor.com> wrote:> > > Now it is just dd, mkfs and copy in the files we need. > > One less thing to worry about keeping versions consistent. > > > > > > I just noticed those 2 files that were added by > > > > syslinux -i boot.img > > > > (right?) > > > > > > > > > Yes, those 2 files came from your 'syslinux' command (in your other > > > email). We don't want anything related to BIOS for now. Hopefully we'll > > > get there at some point. If you can, please comment out the > > > BIOS-related stuff in your script for now. > > > > removed all that. > > > We'll come back to that later, when we combine UEFI with BIOS in the > same boot.img. > > > > > > http://imgr.sytes.net/a/qemu5.png > > > > > > > > > Are we actually dealing with ipxe too in all these tests? > > > > > > > Hmm? > > > > we are dealing with whatever QEMU uses for a boot manager. > > > Your qemu5.png shows ipxe too (my guess is that the boot order is set > to try ipxe first, and if it fails then "boot from hard disk"). > > Additionally, the same qemu5.png shows a Syslinux message: "No > configuration file found", which is not consistent with our tests (as > shown in your qemu4.png). > > I must be "missing" something from your report.Ah, that was just to show what version I am working with. assuming the various debian packages are all based on the same version.> > > > I think the debian package contains broken binaries. I'll chase down the mainter > > Maintainer: Debian CD Group <debian-cd at lists.debian.org> > > Swell. I have a few friends, I'll find someone :p > > > > I came to this conclusion by swapped out the files from the debian > > package with syslinux-6.04-pre1.tar.gz and get a nice menu. > > > > -cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi $target/EFI/BOOT/BOOTX64.EFI > > -cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 $target/EFI/BOOT/LDLINUX.E64 > > -cp /usr/lib/syslinux/modules/efi64/* $target/EFI/BOOT/SYSLINUX/EFI64 > > > > +# wget -N https://mirrors.edge.kernel.org/pub/linux/utils/boot/syslinux/Testing/6.04/syslinux-6.04-pre1.tar.gz > > +# tar -xvf syslinux-6.04-pre1.tar.gz > > > > +cp syslinux-6.04-pre1/efi64/efi/syslinux.efi $target/EFI/BOOT/BOOTX64.EFI > > +cp syslinux-6.04-pre1/efi64/com32/elflink/ldlinux/ldlinux.e64 > > $target/EFI/BOOT/LDLINUX.E64 > > > > +cp syslinux-6.04-pre1/efi64/com32/modules/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64 > > +cp syslinux-6.04-pre1/efi64/com32/lib/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64 > > +cp syslinux-6.04-pre1/efi64/com32/libutil/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64 > > +cp syslinux-6.04-pre1/efi64/com32/menu/*.c32 $target/EFI/BOOT/SYSLINUX/EFI64 > > > > http://imgr.sytes.net/a/qemu6.png > > > The maintainer of the Syslinux packages in Debian is Lukas Schwaighofer > (irc: lus). FWIW, official upstream 6.04-pre1 was built 2 years ago; > the packages from Debian might have a building problem, but they also > include several improvements. Lukas might be able to help with the > error message you are getting, although, I'm still not %100 convinced > that the problem is in the build / source code (it might, but I have > other "suspects" too). > > I might prepare some "UEFIx64 floppy image" for you to boot with qemu > in UEFIx64 mode, "as-is" (i.e. as raw floppy image, no network booting > first, no hard disk attached, just boot the floppy in UEFIx64 mode). > Would you be able to perform such test if I prepare such floppy image?sure - I have a few levels of sandboxing. and box boxing I guess: this dc10b box i am doing all the work on is built for this testing, I reinstall it every few weeks so im not to worried about it. but.. I'd rather a script that wgets/builds and creates the image so I can see/learn what is going on. if that's cumbersome, I'll take an image. I've been meaning to ask: What is efi spec and what is syslinux implementation details? like : efi boot manager boots EFI/BOOT/BOOTX64.EFI that came from syslinux.efi via cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi $target/EFI/BOOT/BOOTX64.EFI I am guessing that looks forEFI/BOOT/LDLINUX.E64 came from cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 $target/EFI/BOOT/LDLINUX.E64 The cfg files have syslinux names, so 'obviously' that is syslinux. Is there any efi spec or recommendations about dir names other than EFI/BOOT ?> > Regards, > Ady. > > _______________________________________________ > Syslinux mailing list > Submissions to Syslinux at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux-- Carl K
After some discussion/debugging behind the scenes, we are back on track, with updated Debian packages. 0_ Starting from an _original_ (so-called "hd-media") boot.img mounted in "target" (or "$target", or some similar notation), and the version of Syslinux-related packages in the OS should be "6.04~git20171011.af7e95c3+dfsg1-6" or newer. At the moment I'm writing this, the packages are in Debian "Unstable" (repo). Although not all the packages are essential for this procedure, the Syslinux-related packages I'm referring to are, at least: _ extlinux _ isolinux _ pxelinux _ syslinux _ syslinux-common _ syslinux-efi _ syslinux-utils Note: For each and every step in the following procedure, it is assumed that any (prior) process has finished (successfully) and that relevant files have been saved and closed before continuing to the next step. 1_ Create 'target/boot/syslinux/syslinux.cfg' 2_ Content of 'target/boot/syslinux/syslinux.cfg' (please note that the PATH directive here is followed by a space character, a dot and a slash character; in theory the slash is optional and I choose to use it for directories; the space and the dot are absolutely essential in our setup): # D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) PATH ./ DEFAULT debian PROMPT 0 LABEL debian CONFIG ../../debian.cfg ../../ 3_ Rename 'target/syslinux.cfg' to 'target/debian.cfg' 4_ Edit content of 'target/debian.cfg' to (only) be: include menu.cfg default vesamenu.c32 prompt 0 timeout 0 5_ Edit content of 'target/exithelp.cfg' to (only) be: label menu kernel vesamenu.c32 config debian.cfg 6_ (Possibly you need some special/root rights/permissions for this step) Delete 'target/ldlinux.*' and 'target/*.c32'. 7_ From the 'bios' subdirectory for Syslinux files in your OS (package), copy: _ vesamenu.c32 _ libcom32.c32 _ libutil.c32 to 'target/boot/syslinux/*.c32'. 8_ Install SYSLINUX to the adequate directory (shown below). Since the "device" (boot.img) is currently mounted, I'm using here the 'extlinux' command. Please adapt the command to the pertinent paths / notation / script(s): extlinux --install $target/boot/syslinux/ or extlinux --install target/boot/syslinux/ or similar, depending on the adequate notation (for your script). Alternatively, the installation of SYSLINUX can instead be performed later on, once/when the device is unmounted, by using one of the alternative official installers for SYSLINUX. This alternative is currently _not_ described in this procedure. Note1: "$target" (or "target") is just one way for me to post the command here. Your real path / script / notation might be slightly different (yet, all variants shall include the subdirectory "boot/syslinux"). Please adapt it accordingly. Note2: the last slash character in the above command might cause an error (which might also be "silent") in some (OS') environments whereas it might be a requirement in others; YMMV - reports are appreciated. For more details about several alternative official installers for Syslinux, see: www.syslinux.org/wiki/index.php/Install 9_ Create 'target/EFI/BOOT/SYSLINUX/EFI64/'. Optionally, create the directory 'target/EFI/BOOT/SYSLINUX/EFI32/' too. 10_ From the 'efi64' subdirectory for Syslinux files in your OS, copy 'syslinux.efi' to 'target/EFI/BOOT/BOOTX64.EFI'. Optionally, from the 'efi32' subdirectory for Syslinux files in your OS, copy 'syslinux.efi' to 'target/EFI/BOOT/BOOTIA32.EFI'. 11_ From the 'efi64' subdirectory for Syslinux files in your OS, copy 'ldlinux.e64' to 'target/EFI/BOOT/LDLINUX.E64'. Optionally, from the 'efi32' subdirectory for Syslinux files, copy 'ldlinux.e32' to 'target/EFI/BOOT/LDLINUX.E32'. 12_ From the 'efi64' subdirectory for Syslinux files, copy: _ vesamenu.c32 _ libcom32.c32 _ libutil.c32 to 'target/EFI/BOOT/SYSLINUX/EFI64/*.c32'. Optionally, from the 'efi32' subdirectory for Syslinux files, copy: _ vesamenu.c32 _ libcom32.c32 _ libutil.c32 to 'target/EFI/BOOT/SYSLINUX/EFI32/*.c32'. 13_ Create 'target/EFI/BOOT/SYSLX64.CFG'. Optionally, create 'target/EFI/BOOT/SYSLIA32.CFG'. 14_ Content of 'target/EFI/BOOT/SYSLX64.CFG': # D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) PATH SYSLINUX/EFI64/ DEFAULT debian PROMPT 0 LABEL debian CONFIG ../../debian.cfg ../../ Optionally, the content of 'target/EFI/BOOT/SYSLIA32.CFG': # D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) PATH SYSLINUX/EFI32/ DEFAULT debian PROMPT 0 LABEL debian CONFIG ../../debian.cfg ../../ 15_ Unmount the 'target', test and report back! :). Hopefully I have no typos in the above steps. Let's also hope that the description was clear enough to follow, and that the results are as expected. Please note that there are potential improvements to the above setup and that not every single aspect of the resulting boot.img has been tested. Regards, Ady.
On Wed, Dec 5, 2018 at 2:21 PM Ady Ady via Syslinux <syslinux at zytor.com> wrote:> > After some discussion/debugging behind the scenes, we are back on > track, with updated Debian packages. > > > 0_ Starting from an _original_ (so-called "hd-media") boot.img mounted > in "target" (or "$target", or some similar notation), and the version > of Syslinux-related packages in the OS should be > "6.04~git20171011.af7e95c3+dfsg1-6" or newer. At the moment I'm writing > this, the packages are in Debian "Unstable" (repo). > > Although not all the packages are essential for this procedure, the > Syslinux-related packages I'm referring to are, at least: > > _ extlinux > _ isolinux > _ pxelinux > _ syslinux > _ syslinux-common > _ syslinux-efi > _ syslinux-utils > > Note: For each and every step in the following procedure, it is assumed > that any (prior) process has finished (successfully) and that relevant > files have been saved and closed before continuing to the next step. > > 1_ Create 'target/boot/syslinux/syslinux.cfg' > > > 2_ Content of 'target/boot/syslinux/syslinux.cfg' (please note that the > PATH directive here is followed by a space character, a dot and a slash > character; in theory the slash is optional and I choose to use it for > directories; the space and the dot are absolutely essential in our > setup): > > # D-I config version 2.0 > # search path for the c32 support libraries (libcom32, libutil etc.) > PATH ./ > DEFAULT debian > PROMPT 0 > LABEL debian > CONFIG ../../debian.cfg ../../ > > > 3_ Rename 'target/syslinux.cfg' to 'target/debian.cfg' > > > 4_ Edit content of 'target/debian.cfg' to (only) be: > > include menu.cfg > default vesamenu.c32 > prompt 0 > timeout 0 > > > 5_ Edit content of 'target/exithelp.cfg' to (only) be: > > label menu > kernel vesamenu.c32 > config debian.cfg > > > 6_ (Possibly you need some special/root rights/permissions for this > step) Delete 'target/ldlinux.*' and 'target/*.c32'. > > > 7_ From the 'bios' subdirectory for Syslinux files in your OS > (package), copy: > _ vesamenu.c32 > _ libcom32.c32 > _ libutil.c32 > > to 'target/boot/syslinux/*.c32'. > > > 8_ Install SYSLINUX to the adequate directory (shown below). Since the > "device" (boot.img) is currently mounted, I'm using here the 'extlinux' > command. Please adapt the command to the pertinent paths / notation / > script(s): > > extlinux --install $target/boot/syslinux/ > > or > > extlinux --install target/boot/syslinux/ > > or similar, depending on the adequate notation (for your script). > > Alternatively, the installation of SYSLINUX can instead be performed > later on, once/when the device is unmounted, by using one of the > alternative official installers for SYSLINUX. This alternative is > currently _not_ described in this procedure. > > Note1: "$target" (or "target") is just one way for me to post the > command here. Your real path / script / notation might be slightly > different (yet, all variants shall include the subdirectory > "boot/syslinux"). Please adapt it accordingly. > > Note2: the last slash character in the above command might cause an > error (which might also be "silent") in some (OS') environments whereas > it might be a requirement in others; YMMV - reports are appreciated. > > For more details about several alternative official installers for > Syslinux, see: > > www.syslinux.org/wiki/index.php/Install > > > 9_ Create 'target/EFI/BOOT/SYSLINUX/EFI64/'. > > Optionally, create the directory 'target/EFI/BOOT/SYSLINUX/EFI32/' too. > > > 10_ From the 'efi64' subdirectory for Syslinux files in your OS, copy > 'syslinux.efi' to 'target/EFI/BOOT/BOOTX64.EFI'. > > Optionally, from the 'efi32' subdirectory for Syslinux files in your > OS, copy 'syslinux.efi' to 'target/EFI/BOOT/BOOTIA32.EFI'. > > > 11_ From the 'efi64' subdirectory for Syslinux files in your OS, copy > 'ldlinux.e64' to 'target/EFI/BOOT/LDLINUX.E64'. > > Optionally, from the 'efi32' subdirectory for Syslinux files, copy > 'ldlinux.e32' to 'target/EFI/BOOT/LDLINUX.E32'. > > > 12_ From the 'efi64' subdirectory for Syslinux files, copy: > _ vesamenu.c32 > _ libcom32.c32 > _ libutil.c32 > > to 'target/EFI/BOOT/SYSLINUX/EFI64/*.c32'. > > Optionally, from the 'efi32' subdirectory for Syslinux files, copy: > _ vesamenu.c32 > _ libcom32.c32 > _ libutil.c32 > > to 'target/EFI/BOOT/SYSLINUX/EFI32/*.c32'. > > > 13_ Create 'target/EFI/BOOT/SYSLX64.CFG'. > > Optionally, create 'target/EFI/BOOT/SYSLIA32.CFG'. > > > 14_ Content of 'target/EFI/BOOT/SYSLX64.CFG': > > # D-I config version 2.0 > # search path for the c32 support libraries (libcom32, libutil etc.) > PATH SYSLINUX/EFI64/ > DEFAULT debian > PROMPT 0 > LABEL debian > CONFIG ../../debian.cfg ../../ > > > Optionally, the content of 'target/EFI/BOOT/SYSLIA32.CFG': > > # D-I config version 2.0 > # search path for the c32 support libraries (libcom32, libutil etc.) > PATH SYSLINUX/EFI32/ > DEFAULT debian > PROMPT 0 > LABEL debian > CONFIG ../../debian.cfg ../../ > > > 15_ Unmount the 'target', test and report back! :). > > Hopefully I have no typos in the above steps. Let's also hope that the > description was clear enough to follow, and that the results are as > expected. > > Please note that there are potential improvements to the above setup > and that not every single aspect of the resulting boot.img has been > tested. >legacy still works as before. (at least help and booting linux do, I didn't test every option) uefi falis with: Failed to load COM32 file vesamenu.c32 this change fixes it:> $target/EFI/BOOT/SYSLX64.CFG <<EOF-PATH SYSLINUX/EFI64/ +PATH EFI/BOOT/SYSLINUX/EFI64/ Lack of leading / tells me CWD is / not /EFI/BOOT good news: linux boots. bad news: selecting the Help option locks it up - menu is still there and keys don't move highlight or anything. cpu here is the relevant bits of https://salsa.debian.org/debconf-video-team/ansible/blob/61b833ad1a010c4f046ea9d1d8c81679e97671e9/usbinst/uefi/build_uefi.sh + cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi target/EFI/BOOT/BOOTX64.EFI + cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 target/EFI/BOOT/LDLINUX.E64 + cp \ /usr/lib/syslinux/modules/efi64/vesamenu.c32 \ /usr/lib/syslinux/modules/efi64/libcom32.c32 \ /usr/lib/syslinux/modules/efi64/libutil.c32 \ target/EFI/BOOT/SYSLINUX/EFI64 target ??? adtxt.cfg ??? boot ? ??? syslinux ? ??? ldlinux.c32 ? ??? ldlinux.sys ? ??? libcom32.c32 ? ??? libutil.c32 ? ??? syslinux.cfg ? ??? vesamenu.c32 ??? debian.cfg ??? disk.lbl ??? EFI ? ??? BOOT ? ??? BOOTX64.EFI ? ??? LDLINUX.E64 ? ??? SYSLINUX ? ? ??? EFI64 ? ? ??? libcom32.c32 ? ? ??? libutil.c32 ? ? ??? vesamenu.c32 ? ??? SYSLX64.CFG ??? exithelp.cfg ??? f10.txt ??? f1.txt ??? f2.txt ??? f3.txt ??? f4.txt ??? f5.txt ??? f6.txt ??? f7.txt ??? f8.txt ??? f9.txt ??? initrd.gz ??? linux ??? menu.cfg ??? prompt.cfg ??? rqtxt.cfg ??? splash.png ??? stdmenu.cfg ??? txt.cfg + cat target/boot/syslinux/syslinux.cfg # D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) PATH ./ DEFAULT debian PROMPT 0 LABEL debian CONFIG ../../debian.cfg ../../ + cat target/debian.cfg include menu.cfg default vesamenu.c32 prompt 0 timeout 0 + cat target/exithelp.cfg label menu kernel vesamenu.c32 config debian.cfg + cat target/EFI/BOOT/SYSLX64.CFG # D-I config version 2.0 # search path for the c32 support libraries (libcom32, libutil etc.) PATH EFI/BOOT/SYSLINUX/EFI64/ DEFAULT debian PROMPT 0 LABEL debian CONFIG ../../debian.cfg ../../ + qemu-system-x86_64 -m 512 -bios OVMF.fd -drive file=boot.img,format=raw> Regards, > Ady. > > _______________________________________________ > Syslinux mailing list > Submissions to Syslinux at zytor.com > Unsubscribe or set options at: > http://www.zytor.com/mailman/listinfo/syslinux-- Carl K