[syslinux] fixing debian's hd-media image
Carl Karsten
carl at personnelware.com
Fri Nov 16 17:21:56 PST 2018
On Thu, Nov 15, 2018 at 1:10 PM Ady Ady via Syslinux <syslinux at zytor.com> wrote:
>
> Here are some comments and questions for you.
>
Thanks.
I've have my scripts to a better state, including installing/using
qemu to uefi and legacy boot the usb stick for testing.
It mostly works for me, but the "wget a tarball of binaries" step
isn't going to sit well with the debian folk, so I'm not done yet. I
may be close enough that they will know how to do it properly.
> > I want to eufi boot this image:
> > http://cdn-fastly.deb.debian.org/debian/dists/testing/main/installer-amd64/current/images/hd-media/boot.img.gz
>
>
> I am going to assume that by "boot this image" you don't mean something
> like memdisk or equivalent, but rather that you want to transfer that
> image using "dd" to your (USB) device and boot the resulting device in
> UEFI mode. Is this assumption correct?
correct.
>
>
> >
> > there is a bug against it:
> > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=913523
>
>
> Although this is the Syslinux Mailing List and not Debian's in
> particular...
syslinux list because I am trying to UEFI boot syslinux.
> I would say that the above bug report is slightly
> confusing. AFAIK, the files under "hd-media" are aimed at a specific
> scenario (i.e. starting the _installation_ of the OS from a filesystem
> volume that is already part of the HDD).
correct, kinda. it boots a linux kernel, and runs the installer.
Unless it is a UEFI only box, and then it doesn't boot, which is a
problem.
> I could be wrong but, where
> does it say that the boot.img(.gz) mentioned in that report is aimed at
> (or that it supports) booting Debian (itself) from USB?
It's implied. or desired, so we could call it a feature request.
>
> Moreover, where is the official info claiming that the boot.img(.gz)
> file can support booting in UEFI mode? (FWIW, ATM it doesn't, unless
> you add "some things").
correct - I was confused that a UEFI box booted it using compatibility mode.
>
> Additionally, the boot.img(.gz) file is not supposed to have a
> partition table. Not having a partition table is not a bug for that
> image (the image is a (potentially bootable) filesystem volume). I
> could be wrong but, AFAIU, the image is not aimed at being written to
> the HDD as a complete, partitioned HDD. You could write a device with
> it, but it would then be a (super)floppy-like device. Whether such
> device effectively serves its purpose of launching the installer (for
> Debian), that's another matter.
all correct.
>
> Now, perhaps an important detail to be aware of: the UEFI specs indeed
> support booting a filesystem volume in UEFI mode. Just think of it as a
> (super)floppy (i.e. no partition table, no MBR, _no GPT_).
I was wondering about that. I'll stop trying to figure out how to do
that, so thank you,
>
>
>
> >
> > I'd like to fix the resulting usb stick for my use, and also fix it in
> > a way that can be used to fix the upstream bug.
>
>
> You are using the term "fix" twice here, and I have to admit that, to
> me, it is not at all clear what exactly you mean.
I would like a quick workaround so I can boot the box I am in
possession of (which I have now achieved)
and also something that can be contributed to the debian project. (I'm close)
>
> What exactly is wrong in the resulting USB stick?
It is built by me floundering around, call it prof of concept.
I'm a little bothered that syslinux.efi isn't in the debian package,
and should I use the ldlinux.e64 from the tarbal or package?
>
> What is "upstream" to you in this context? Debian? D-I? The Syslinux
> Project? Other?
Debian.
I think add some lines around here:
https://salsa.debian.org/installer-team/debian-installer/blob/master/build/config/x86.cfg#L113-115
mcopy -i$(TEMP_BOOT) /usr/lib/syslinux/modules/bios/vesamenu.c32
::vesamenu.c32; \
mcopy -i$(TEMP_BOOT) /usr/lib/syslinux/modules/bios/libcom32.c32
::libcom32.c32; \
mcopy -i$(TEMP_BOOT) /usr/lib/syslinux/modules/bios/libutil.c32
::libutil.c32 ; \
>
>
> >
> > I'm trying to follow the guids
> > https://www.syslinux.org/wiki/index.php?title=Install#UEFI
> > and a ml post - here is what I have so far:
> >
> > https://salsa.debian.org/carlfk-guest/ansible/blob/uefiusb/usbinst/uefi/fix_hdmedia.sh
> > (likely quite a bit of unneeded copies)
> >
> > it boots, (good)
> > Initial menu has no LABEL enries!
>
>
> I have to say that your cfg file(s) are not very clear to me (at the
> time I was reading your script, which by now has been changed).
The scripts got a whole lot simpler, now basicly:
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/
cp /usr/lib/syslinux/modules/efi64/* $target/EFI/syslinux
> Could
> you please post here the resulting directory tree, the list of file
> names in each directory and the complete resulting content of all the
> cfg files, without pointing us to a script?
carl at twist:/media/carl/Debian Inst$ tree -d
└── EFI
├── BOOT
└── syslinux
carl at twist:/media/carl/Debian Inst$ tree
├── adgtk.cfg
├── adspkgtk.cfg
├── adtxt.cfg
├── disk.lbl
├── EFI
│ ├── BOOT
│ │ ├── BOOTX64.EFI
│ │ └── ldlinux.e64
│ └── syslinux
│ ├── cat.c32
│ ├── chain.c32
│ ├── cmd.c32
│ ├── cmenu.c32
│ ├── config.c32
│ ├── cptime.c32
│ ├── cpu.c32
│ ├── cpuid.c32
│ ├── cpuidtest.c32
│ ├── debug.c32
│ ├── dhcp.c32
│ ├── disk.c32
│ ├── dmi.c32
│ ├── dmitest.c32
│ ├── elf.c32
│ ├── ethersel.c32
│ ├── gfxboot.c32
│ ├── gpxecmd.c32
│ ├── hdt.c32
│ ├── hexdump.c32
│ ├── host.c32
│ ├── ifcpu64.c32
│ ├── ifcpu.c32
│ ├── ifmemdsk.c32
│ ├── ifplop.c32
│ ├── kbdmap.c32
│ ├── kontron_wdt.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
│ ├── pcitest.c32
│ ├── pmload.c32
│ ├── poweroff.c32
│ ├── prdhcp.c32
│ ├── pwd.c32
│ ├── pxechn.c32
│ ├── reboot.c32
│ ├── rosh.c32
│ ├── sanboot.c32
│ ├── sdi.c32
│ ├── sysdump.c32
│ ├── syslinux.c32
│ ├── vesa.c32
│ ├── vesainfo.c32
│ ├── vesamenu.c32
│ ├── vpdtest.c32
│ ├── whichsys.c32
│ └── zzjson.c32
├── exithelp.cfg
├── f10.txt
├── f1.txt
├── f2.txt
├── f3.txt
├── f4.txt
├── f5.txt
├── f6.txt
├── f7.txt
├── f8.txt
├── f9.txt
├── g2ldr
├── g2ldr.mbr
├── gtk.cfg
├── initrdg.gz
├── initrd.gz
├── ldlinux.c32
├── ldlinux.sys
├── libcom32.c32
├── libutil.c32
├── linux
├── menu.cfg
├── NvVars
├── prompt.cfg
├── rqgtk.cfg
├── rqspkgtk.cfg
├── rqtxt.cfg
├── setup.exe
├── spkgtk.cfg
├── splash.png
├── stdmenu.cfg
├── syslinux.cfg
├── txt.cfg
├── vesamenu.c32
└── win32-loader.ini
carl at twist:/media/carl/Debian Inst$ cat syslinux.cfg
# simple syslinux.cfg
DEFAULT linux
LABEL linux
KERNEL linux
INITRD initrd.gz
>
> BTW, Debian "Testing" ATM has the most up-to-date binaries of Syslinux,
> even newer (and better) than the official 6.04-pre1 of kernel.org.
>
>
> > boot:
> > linux boot linux, but no initrd, but i'm sure once I get the .cfg
> > files worked out that will fall into place.
> >
>
> Best 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
More information about the Syslinux
mailing list