[syslinux] fixing debian's hd-media image

Ady Ady ady-sf at hotmail.com
Thu Nov 15 11:06:02 PST 2018

Here are some comments and questions for you.

> 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?

> 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... 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). 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?

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").

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.

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'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.

What exactly is wrong in the resulting USB stick?

What is "upstream" to you in this context? Debian? D-I? The Syslinux 
Project? Other?

> 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). 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?

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,

More information about the Syslinux mailing list