[syslinux] Improving TAILS

Ady Ady ady-sf at hotmail.com
Wed Apr 12 13:33:04 PDT 2017


> Hi,
> 
> Ady:
> > I am using the ISO image from TAILS as an excuse to "tease" TAILS' devs 
> > and other users of Syslinux. If intrigeri (TAILS developer) "bites". 
> > then users reading this mailing list might learn one thing or two about 
> > Syslinux (6.04-pre1+).
> 
> :)
> 
> > 1_ EFI/BOOT/isolinux.bin is probably a mistake (or misunderstanding) 
> > originated in the ISO building scripts for TAILS, as this file is 
> > worthless for EFI. From the list of files, probably this is not the 
> > only file from Syslinux that could be deleted in this ISO image.
> 
> Right. We simply copy all files from the isolinux installation
> directory to EFI/BOOT. It does copy some useless stuff but it's
> simpler and easier to maintain that building+maintaining the list of
> what exactly we need to copy. YMMV :)
 
 
I might be missing something. Are most of these files needed, and in 
both directories? Which files are exactly the same? Which differences 
are introduced after copying (or repeating the same directory-building 
with) the files from the first directory to the other? Are the 
kernel/initrd/other (non-Syslinux) files the same or are they 
different?

 
> 
> > 2_ The whole EFI\BOOT\grub directory could potentially be deleted. 
> > IIRC, the initial intention of having both, syslinux.efi and grub.efi 
> > in TAILS was to _automatically_ load the adequate efi binary for each 
> > EFI architecture (x86 / ia32), overcoming a (prior) limitation in 
> > Syslinux. Syslinux 6.04-pre1 already includes a solution for this 
> > situation. We'll see whether intrigeri bites ;).
> 
> Assuming you're referring to commit 7d9c9ec
> ("core/fs/lib/loadconfig.c: Add architecture-specific config name to
> search"): right, I do intend to look into it, and indeed this will
> most likely allow us to drop GRUB for ia32 EFI. Thanks! But quite
> frankly I'd rather wait for 6.04 to be actually released.
> 
> Now tracked on Tails' side: https://labs.riseup.net/code/issues/12440
> 
> > However, I do not see "ldlinux.e32" in the list provided by Pete, so 
> > perhaps TAILS' devs. have decided to just use grub.efi (and no 
> > chainloading)?
> 
> Exactly. I didn't manage to chainload 32-bit syslinux EFI from GRUB,
> and I didn't bother since GRUB's syslinux_configfile works fine for us.
> 
> > 3_ When building the ISO image, the script(s) should rather move 
> > everything from the "isolinux" directory to a "syslinux" directory. The 
> > same goes to the cfg file name, as isolinux.bin can use "syslinux.cfg" 
> > just fine. Then the ISO building script should use this "syslinux/" 
> > path for the location of isolinux.bin. This is, of course, for BIOS, as 
> > "isolinux" has nothing to do with UEFI. For possible reference, 
> > GpartedLive and ClonezillaLive are already using this naming 
> > convention.
> 
> That's interesting, I didn't know that isolinux.bin could read
> a syslinux.cfg file :) This would simplify the USB installers' job:
> IIRC they currently have to rename isolinux → syslinux, isolinux.cfg →
> syslinux.cfg, and to do adjust the config files accordingly.
> 
> I've filed a ticket in our task/bug tracker so it stays on my radar:
> https://labs.riseup.net/code/issues/12439
> 
> > All the above steps would simplify the directory tree, would simplify 
> > the steps for writing a bootable USB drive using the content of the ISO 
> > image, would reduce the need to maintain grub.efi too (in addition to 
> > syslinux.efi), and would reduce the size of the resulting ISO image.
> 
> Absolutely. Thanks a lot for these helpful suggestions :)
> 
 
 
For BIOS, it works as described in:
 core\fs\iso9660/iso9660.c 
and in
 core/fs/lib/loadconfig.c 

since Syslinux 4.02/4.03. The UEFI modification adding optional cfg 
files for UEFI IA32 / X64 is available since 6.04-pre1.

This is explained at:
 http://www.syslinux.org/wiki/index.php/Configuration_location_and_name 


For TAILS' ISO image, the Syslinux-related files for BIOS would be 
located under the "syslinux/" directory (instead of "isolinux/"). If 
this move is implemented in TAILS' ISO images, then the "isolinux/" 
directory shall not exist in the ISO image anymore. The configuration 
file for BIOS would then be "syslinux/syslinux.cfg", which would then 
be recognized by isolinux.bin too.

And in mkisofs or xorriso, TAILS would use something similar to:

 -c syslinux/boot.cat -b syslinux/isolinux.bin

Other ISO images might use "boot/syslinux/" (as UBCD has been using for 
several years now).

 
> Regards,
> -- 
> intrigeri
> 
 
Regards,
Ady.
PS: I am posting this email to the Syslinux Mailing List only.



More information about the Syslinux mailing list