On Fri, Nov 30, 2018 at 9:56 AM Ady Ady via Syslinux <syslinux at zytor.com> wrote:> > @Carl, > > I have a proposal for you here (in the Syslinux mailing list): let's > first find out _what_ exactly is required in order to boot in UEFI > mode, and then you can take the info downstream. Whether "downstream" > means your own personal customized boot.img, or D-I, or whatever else, > that's another matter.yep> > Considering that thought, for now let's forget about the above "mcopy" > instructions and/or _how_ exactly "downstream" would achieve the "what" > I just mentioned. > > > > 2 problems I have identified: > > If I don't put the above syslinux.cfg and go with what is on the d-i > > setup, this seems to hang it: > > > > default vesamenu.c32 > > > > #comment that out, and I get to another problem that I haven't taken > > the time to track down yet. > > Does any of this look like a problem? > > > > > (snip) > > Yes, of course you don't have a menu, because you are using c32 files > from the BIOS platform (those that came with the original boot.img), > not from EFI64.Right. we can ignore all that for now.> > For this "troubleshooting", please forget about the original d-i setup > (for now), as it is not relevant for what you want to achieve at this > initial step.ok, lets build from an almost blank image. it will still have the syslinux boot loader (is that the right term?) and linux/initrd> > For troubleshooting, you do _not_ want to create your "simple > syslinux.cfg" for booting in UEFI mode in the root directory of the fs > (of your USB). > > Let me rephrase what I wrote in my prior email. You need to see the > following files, in this exact location within the FAT(32) filesystem > volume in your USB device (later we could move around some things, but > for now, KISS): > > * From the 'efi64' subdirectory for syslinux files, 'syslinux.efi' to: > _ /media/sdc/EFI/BOOT/BOOTX64.EFI > > * From the 'efi64' subdirectory for syslinux files, 'ldlinux.e64' to: > _ /media/sdc/EFI/BOOT/LDLINUX.E64 > > * From boot.img (or from wherever you are taking your kernel+initrd) > to: > _ /media/sdc/linux > _ /media/sdc/initrd.gz > > (that's the root of your FAT32 fs in your USB device, not > "./EFI/BOOT/") >> For now, all the rest is not needed, and I might say it is not even > welcomed.deleted all the other files> > In addition to those files that you will copy from those locations to > that specific directories / filenames, you need to create one file: > _ /media/sdc/EFI/BOOT/SYSLINUX.CFG > > Please note that the directory is _not_ the root of your fs but > "./EFI/BOOT/" in the fs of the USB device. This directory is the same > as where you already have 'BOOTX64.EFI' and 'LDLINUX.E64'. > > The content of "/media/sdc/EFI/BOOT/SYSLINUX.CFG" should be: > > ### EFI/BOOT/SYSLINUX.CFG start ### > # > # Note that there are no special symbols > # and no spaces within the labels. > # IOW, labels should be one word with English letters when > troubleshooting. > # Even better, make that "at most 8 English letters" when > troubleshooting. > # > # Additionally, we will avoid naming labels using > # the name of any other files. > # E.g., if our kernel file is named 'linux' > # then no label should be 'linux'. > > DEFAULT mylabel > PROMPT 1 > TIMEOUT 100 > SAY *** Press enter to boot the default label *** > > LABEL mylabel > # Please note it is not "my label", no spaces within the label. > # Please note it is not "linux", as the kernel is already named > 'linux'. > > LINUX /linux > # Please note it is not "KERNEL /linux" nor "LINUX linux". > > INITRD /initrd.gz > # Please note it is not "INITRD initrd.gz", > # we use absolute paths here too. > > ### EFI/BOOT/SYSLINUX.CFG end ### > > Now, for troubleshooting, you do not want anything else in your USB > device, other than those files I just mentioned. IOW, you want to be > sure at this point that the only way to boot this device is by UEFI > mode in the x64 platform, using syslinux.efi, and then it should boot > your 'linux+initrd.gz' files in such mode. My suggestion would be to > move anything irrelevant, for this initial troubleshooting, out of the > USB device. > > In particular, please avoid having "/syslinux.cfg" in (the root of) > your USB device at this time.+ 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 + cat + tree target target ??? EFI ? ??? BOOT ? ? ??? BOOTX64.EFI ? ? ??? LDLINUX.E64 ? ? ??? SYSLINUX.CFG ? ??? syslinux ??? initrd.gz ??? linux 3 directories, 5 files + cat target/EFI/BOOT/SYSLINUX.CFG ### EFI/BOOT/SYSLINUX.CFG start ### # # Note that there are no special symbols # and no spaces within the labels. # IOW, labels should be one word with English letters when troubleshooting. # Even better, make that "at most 8 English letters" when troubleshooting. # # Additionally, we will avoid naming labels using # the name of any other files. # E.g., if our kernel file is named 'linux' # then no label should be 'linux'. DEFAULT mylabel PROMPT 1 TIMEOUT 100 SAY *** Press enter to boot the default label *** LABEL mylabel # Please note it is not "my label", no spaces within the label. # Please note it is not "linux", as the kernel is already named 'linux'. LINUX /linux # Please note it is not "KERNEL /linux" nor "LINUX linux". INITRD /initrd.gz # Please note it is not "INITRD initrd.gz", # we use absolute paths here too. ### EFI/BOOT/SYSLINUX.CFG end ### the version of my code is here for anyone that wants to get a clean copy: https://salsa.debian.org/debconf-video-team/ansible/blob/e6e02369fad365cbed90f10b8df888fcda87783d/usbinst/uefi/build_uefi.sh> > I know, I know... We don't have a boot menu yet. Patience :). > > For a boot menu, and only when the above configuration actually boots > your kernel+initrd in UEFIx64 mode, we will add some additional > Syslinux files from the 'efi64' subdirectory and we'll edit > "/media/sdc/EFI/BOOT/SYSLINUX.CFG" accordingly. > > Could you please confirm that the above setup actually works? If it > fails in > any way, we need to know that too.it works. (boots into the d-i installer, I don't care if the installer is missing stuff, booting it is all we care about here.> > If this setup works, we'll add complexity and a boot menu, and > eventually we > will also put back the BIOS stuff.I'd like to get the installer menus (what comes on the boot.img) working with as little change as possible. Even if they aren't great, I am more interested in my patch to upstream being simple and easy to accept. Patience... yes.. I'll let you continue to drive.> > 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
> it works. (boots into the d-i installer, I don't care if the installer > is missing stuff, booting it is all we care about here.OK, so let's add complexity (but not the whole thing, not yet). We already have: target ??? EFI ? ??? BOOT ? ? ??? BOOTX64.EFI ? ? ??? LDLINUX.E64 ? ? ??? SYSLINUX.CFG ? ??? syslinux ??? initrd.gz ??? linux The 'EFI/BOOT/syslinux/' directory was a leftover from your prior tests (and not a requirement in my prior email). In the previous (our "effective first") test, it was not used. Since we are going to use it now, and in order to be coherent with other directory and file names related to Syslinux in FAT(32) (and considering we are troubleshooting a "generic" procedure), we are going to rename 'EFI/BOOT/syslinux/' to 'EFI/BOOT/SYSLINUX/' (all uppercase). * Once we don't have 'EFI/BOOT/syslinux/' anymore (because we renamed it to all-uppercase), in your "target" device, we want (at least) one additional directory: _ "target/EFI/BOOT/SYSLINUX/EFI64/" (all uppercase) * From the 'efi64' subdirectory (tree) for syslinux files in your OS/package/archive, you want to copy all "*.c32" files to: _ "target/EFI/BOOT/SYSLINUX/EFI64/*.c32" Let me re-emphasize this point: the "*.c32" modules we are copying right now are from the "efi64" subdirectory (and down its tree). If you put in this (newly-created) "target/EFI/BOOT/SYSLINUX/EFI64/" directory any c32 module that is not from the efi64 platform, eventually something will fail and we will have no way to know what's wrong. Please, do _not_ mix in this directory any c32 file from a different platform (not from "efi32", and not from "bios"). The reason we are copying _all_ the c32 modules from efi64 at this step is for simplicity when troubleshooting. We probably don't really need all of them, but such potential "clean-up" can be done later-on, when we know that all the basic things are working as expected. Now we want to test whether the basic functionality of vesamenu.c32 in efi64 works with this setup, _without_ focusing on the specific linux kernel you eventually would like to boot nor on the whole Debian menu; in these next steps (and in the next test), we are focusing on vesamenu.c32 and our current directory tree. * You need to create a new file: _ "target/EFI/BOOT/SYSLX64.CFG" Please note: "SYSLX64.CFG" is supported since Syslinux 6.04-pre1. Older versions do not support this configuration file name. Please note: There are several ways to achieve the main goal; this is only one of them. I'm trying to make it as simple as possible for troubleshooting (IMHO). The (initial, for now) content of "target/EFI/BOOT/SYSLX64.CFG": ### EFI/BOOT/SYSLX64.CFG start ### UI SYSLINUX/EFI64/vesamenu.c32 DEFAULT lslabel PROMPT 1 TIMEOUT 100 SAY *** Press enter to boot the default label *** LABEL lslabel COM32 SYSLINUX/EFI64/ls.c32 LABEL pwdlabel COM32 SYSLINUX/EFI64/pwd.c32 LABEL mylabel LINUX /linux INITRD /initrd.gz ### EFI/BOOT/SYSLX64.CFG end ### * Save / close any relevant opened files and unmount the image (or the fs of your testing device). When booting in UEFI x64 mode in your next test, you should see a boot menu. I'd like to ask you to test all the entries in the menu and report the results for each. If, instead, the boot menu does not show up, we need to know the details / results too. A minor detail (that might be relevant for your report): we are defining a TIMEOUT of 10.0 seconds. When you select "lslabel", the result should show up on screen during those 10.0 seconds (unless you press 'enter', or some other key, before that time), and then the boot menu should show up again. The same goes for "pwdlabel". So, if you want to take note of the results of each entry and you hadn't have enough time, then, while in the boot prompt, simply press the "left arrow" (or "cursor") key once and then the "right arrow" key once, or change the TIMEOUT value, or select the same menu entry again from the boot menu. IOW, the TIMEOUT value is relevant not only when the boot menu is displayed on screen but also when the boot prompt is awaiting some initial input. Regards, Ady.
On Sat, Dec 1, 2018 at 2:46 AM Ady Ady via Syslinux <syslinux at zytor.com> wrote:> > > it works. (boots into the d-i installer, I don't care if the installer > > is missing stuff, booting it is all we care about here. > > > OK, so let's add complexity (but not the whole thing, not yet). > > We already have: > > target > ??? EFI > ? ??? BOOT > ? ? ??? BOOTX64.EFI > ? ? ??? LDLINUX.E64 > ? ? ??? SYSLINUX.CFG > ? ??? syslinux > ??? initrd.gz > ??? linux > > The 'EFI/BOOT/syslinux/' directory was a leftover from your prior tests > (and not a requirement in my prior email). In the previous (our > "effective first") test, it was not used. Since we are going to use it > now, and in order to be coherent with other directory and file names > related to Syslinux in FAT(32) (and considering we are troubleshooting > a "generic" procedure), we are going to rename 'EFI/BOOT/syslinux/' to > 'EFI/BOOT/SYSLINUX/' (all uppercase). > > * Once we don't have 'EFI/BOOT/syslinux/' anymore (because we renamed > it to all-uppercase), in your "target" device, we want (at least) one > additional directory: > _ "target/EFI/BOOT/SYSLINUX/EFI64/" > > (all uppercase) > > * From the 'efi64' subdirectory (tree) for syslinux files in your > OS/package/archive, you want to copy all "*.c32" files to: > > _ "target/EFI/BOOT/SYSLINUX/EFI64/*.c32" > > Let me re-emphasize this point: the "*.c32" modules we are copying > right now are from the "efi64" subdirectory (and down its tree). If you > put in this (newly-created) "target/EFI/BOOT/SYSLINUX/EFI64/" directory > any c32 module that is not from the efi64 platform, eventually > something will fail and we will have no way to know what's wrong. > Please, do _not_ mix in this directory any c32 file from a different > platform (not from "efi32", and not from "bios"). > > The reason we are copying _all_ the c32 modules from efi64 at this step > is for simplicity when troubleshooting. We probably don't really need > all of them, but such potential "clean-up" can be done later-on, when > we know that all the basic things are working as expected. > > > Now we want to test whether the basic functionality of vesamenu.c32 in > efi64 works with this setup, _without_ focusing on the specific linux > kernel you eventually would like to boot nor on the whole Debian menu; > in these next steps (and in the next test), we are focusing on > vesamenu.c32 and our current directory tree. > > * You need to create a new file: > > _ "target/EFI/BOOT/SYSLX64.CFG" > > Please note: "SYSLX64.CFG" is supported since Syslinux 6.04-pre1. Older > versions do not support this configuration file name. > > Please note: There are several ways to achieve the main goal; this is > only one of them. I'm trying to make it as simple as possible for > troubleshooting (IMHO). > > > The (initial, for now) content of "target/EFI/BOOT/SYSLX64.CFG": > > ### EFI/BOOT/SYSLX64.CFG start ### > > UI SYSLINUX/EFI64/vesamenu.c32 > DEFAULT lslabel > PROMPT 1 > TIMEOUT 100 > SAY *** Press enter to boot the default label *** > > LABEL lslabel > COM32 SYSLINUX/EFI64/ls.c32 > > LABEL pwdlabel > COM32 SYSLINUX/EFI64/pwd.c32 > > LABEL mylabel > LINUX /linux > INITRD /initrd.gz > > ### EFI/BOOT/SYSLX64.CFG end ### > > * Save / close any relevant opened files and unmount the image (or the > fs of your testing device).mkdir -p $target/EFI/BOOT $target/EFI/BOOT/SYSLINUX/EFI64 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 + tree target target ??? EFI ? ??? BOOT ? ??? BOOTX64.EFI ? ??? LDLINUX.E64 ? ??? SYSLINUX ? ? ??? EFI64 ? ? ??? cat.c32 ? ? ??? chain.c32 ? ? ??? cmd.c32 ? ? ??? cmenu.c32 ? ? ??? config.c32 ? ? ??? cptime.c32 ? ? ??? cpu.c32 ? ? ??? cpuid.c32 ? ? ??? cpuidtest.c32 ? ? ??? debug.c32 ? ? ??? dhcp.c32 ? ? ??? dir.c32 ? ? ??? dmi.c32 ? ? ??? dmitest.c32 ? ? ??? gfxboot.c32 ? ? ??? hdt.c32 ? ? ??? hexdump.c32 ? ? ??? host.c32 ? ? ??? ifcpu64.c32 ? ? ??? ifcpu.c32 ? ? ??? ldlinux.e64 ? ? ??? lfs.c32 ? ? ??? libcom32.c32 ? ? ??? libgpl.c32 ? ? ??? liblua.c32 ? ? ??? libmenu.c32 ? ? ??? libutil.c32 ? ? ??? linux.c32 ? ? ??? ls.c32 ? ? ??? lua.c32 ? ? ??? mboot.c32 ? ? ??? meminfo.c32 ? ? ??? menu.c32 ? ? ??? pci.c32 ? ? ??? pwd.c32 ? ? ??? reboot.c32 ? ? ??? rosh.c32 ? ? ??? sysdump.c32 ? ? ??? syslinux.c32 ? ? ??? vesa.c32 ? ? ??? vesamenu.c32 ? ? ??? vpdtest.c32 ? ? ??? whichsys.c32 ? ? ??? zzjson.c32 ? ??? SYSLX64.CFG ??? initrd.gz ??? linux + cat target/EFI/BOOT/SYSLX64.CFG ### EFI/BOOT/SYSLX64.CFG start ### UI SYSLINUX/EFI64/vesamenu.c32 DEFAULT lslabel PROMPT 1 # TIMEOUT 100 SAY *** Press enter to boot the default label *** LABEL lslabel COM32 SYSLINUX/EFI64/ls.c32 LABEL pwdlabel COM32 SYSLINUX/EFI64/pwd.c32 LABEL mylabel LINUX /linux INITRD /initrd.gz ### EFI/BOOT/SYSLX64.CFG end ###> > When booting in UEFI x64 mode in your next test, you should see a boot > menu.Nope: *** Press enter to boot the default label *** Failed to load libcom32.c32 Failed to load COM32 file SYSLINUX/EFI64/vesamenu.c32 boot:> I'd like to ask you to test all the entries in the menu and > report the results for each. If, instead, the boot menu does not show > up, we need to know the details / results too. > > A minor detail (that might be relevant for your report): we are > defining a TIMEOUT of 10.0 seconds. When you select "lslabel", the > result should show up on screen during those 10.0 seconds (unless you > press 'enter', or some other key, before that time), and then the boot > menu should show up again. The same goes for "pwdlabel". So, if you > want to take note of the results of each entry and you hadn't have > enough time, then, while in the boot prompt, simply press the "left > arrow" (or "cursor") key once and then the "right arrow" key once, or > change the TIMEOUT value, or select the same menu entry again from the > boot menu. IOW, the TIMEOUT value is relevant not only when the boot > menu is displayed on screen but also when the boot prompt is awaiting > some initial input.I #disabled the timeout so that it wouldn't keep cluttering the screen when I was trying to take notes. at the boot: prompt, hit tab, enter the 3 ... boot: lslabel pwdlabel mylabel boot: lslabel [dir] [dir] SYSLINUX LDLINUX.E64 [dir] . BOOTX64.EFI SYSLX64.CFG boot: pwdlabel /EFI/BOOT/ boot: mylabel (linux boots)> 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