[ipxe-devel] ipxe supplies wrong initrd size to syslinux/memdisk

Levente LEVAI levail at aviatronic.hu
Mon Feb 17 21:16:14 UTC 2014


It seems ipxe (I use a build of 7405685df2bea9a457970d8b5a63ede08fcda6f7)
supplies the wrong size (size actually allocated, instead of the size 
downloaded)
when passing ramdisk size to a multiboot kernel. This breaks gzip
in syslinux/memdisk because compressed size of the gzip-ped archive
apparently resides in the last four bytes of the file. Apart from 
extremely lucky
cases the allocated and actual size differ, so memdisk has no chance of 
reading
this value to its satisfaction.

This results in memdisk dieing with
Decompression error: output buffer overrun
error (the len printed is a round binary number, that's what made me 
suspicious
of the cause in the first place).

As a hack I modified memdisk to accept a usesize parameter and provided
the correct archive size there (overwriting the value passed by ipxe). 
This lets me
boot my gzip-ped image.

But I think the problem is with ipxe code (somewhere the allocated size is
passed to the multiboot kernel instead of the actual size of the ramdisk
image). If someone could point me to the right source file where the 
ramdisk size
is set I would correct this.

/levente



More information about the ipxe-devel mailing list