[syslinux] Using memdisk with grub2 and a compressed iso

David Shaw dshaw at jabberwocky.com
Thu Apr 9 11:27:07 PDT 2015


On Apr 9, 2015, at 2:18 AM, Ady via Syslinux <syslinux at zytor.com> wrote:
> 
> 
>> Hello,
>> 
>> I'm having a problem booting a compressed ISO image using memdisk via grub2 (version 2.02).  The entry in my grub.cfg looks like:
>> 
>> menuentry 'boot ISO image' {
>>    linux16 /memdisk iso
>>    initrd16 /my-image.iso.gz
>>  }
>> 
>> When selected, this starts to boot and then fails with:
>> 
>>   Ramdisk at 0x37979000, length 0x0033b298
>>   gzip image: decompressed addr 0x7f7f7000, len 0x00008f58: failed
>>   Decompression error: output buffer overrun
>> 
>> FWIW, my-image.iso.gz is 3388055 bytes long compressed, and 9394176 bytes long uncompressed.  The box in question has 8GiB of RAM.
>> 
>> 1) I have tried this with memdisk from syslinux 4.02, 4.05, and 6.03.  Same failure each time.
>> 2) Changing the level of compression (i.e. gzip -1 instead of gzip -9) does not make it work.
>> 3) Doing the same thing with grub1 (version 0.97), but using the same image and same version of memdisk, *does* work.
>> 4) Uncompressing the ISO *does* make it work.
>> 
>> Any suggestions on where to look next?
>> 
>> David
>> 
> 
> Your report suggests that the issue might be related to grub2. The 
> problem could be related to some key word / syntax (e.g. some possible 
> change between grub legacy and grub2), or it could be related to the 
> source code itself (bug? dropped feature?), or some combination of 
> them.

Thanks for your reply.  I've run a few more tests since last night, and found two interesting things.  First, using zip instead of gzip to compress the iso works fine.  This decompression problem only happens with gzip, so that's a possible workaround if anyone else hits this.  The other thing I noticed is that the (uncompressed) size of the iso is 9394176 bytes.  In hex, that's 8F5800.  The length given in the error message is 8F58 - that is, exactly 256 times too small.  That seems suspicious.

I'll reach out to the grub2 people as well.

David




More information about the Syslinux mailing list