[syslinux] Proposal for Chain-Loadable LDLINUX.SYS

Gert Hulselmans hulselmansgert at gmail.com
Wed Jan 2 11:01:01 PST 2013


2013/1/2 Shao Miller <sha0.miller at gmail.com>:
>
> The multiboot kernel can accept a boot disk notification from the
> boot-loader, but perhaps FreeLdr doesn't use it, or perhaps there's a bug
> somewhere...  This almost rings a bell as familiar discussion for
> mboot.c32...  I'm pretty sure Gert Hulselmans has thought about this stuff
> before.
>
>
>> Benefit though of the multiboot style is gz-compression support, thus
>> reducing size of the kernel binary on disk.
>
>
> If we want ldlinux.sys to continue to work with the VBR code, any
> decompression support would also have to be present and available pretty
> early, I think.
>
AFAIK ldlinux.sys is already compressed with LZO.

Quote from lzo/LZO.TXT:

    LZO is a portable lossless data compression library written in ANSI C.
    It offers pretty fast compression and very fast decompression.
    Decompression requires no memory.

That is why you won't see /boot/isolinux/ or /boot/syslinux strings in
isolinux.bin and ldlinux.sys
anymore.

It was introduced at 20 May 2009:
http://git.kernel.org/?p=boot/syslinux/syslinux.git;a=commit;h=0d82b71304d596d80f3c4520f9dcf90048ca50b7

>
> On 1/2/2013 12:42, Bernd Blaauw wrote:
>>
>> Op 2-1-2013 12:15, Shao Miller schreef:
>>
>>> Just for fun, maybe it'd be neat to leave room for some possible future
>>> hybridization in ldlinux.sys, such as:
>>> - Current style
>>> - Multiboot (thinking about tackling this)
>>> - Linux x86 kernel-format
>>> - DOS .EXE
>>
>>
>> UPX executable binary compression support while at it (with leaving
>> everything else mentioned intact).
>> Then again, current core is tiny already. Something that would more
>> benefit from that is some variant of GRUB.

Grub2 also supports compression.
If I recall correctly, they first used LZO comprssion too, but now they use lzma
or xz to generate a smaller core.img file (so more modules can be included) that
still fits in the 63 "hidden" sectors (512 bytes/sector) before the
start of the first
partition for disks partitioned the old way.

- Gert Hulselmans


More information about the Syslinux mailing list