Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[bzimage] Report exact initrd length via bzImage header
iPXE currently pads initrd images to a multiple of 4kB and inserts zero padding between images, as required by some versions of the Linux kernel. The overall length reported via the ramdisk_size field in the bzImage header includes this zero padding. This causes problems when using memdisk to load a gzip-compressed disk image. memdisk treats the ramdisk_size field as containing the exact length of the initrd image, and uses this length to locate the 8-byte gzip footer. This will generally cause memdisk to fail to decompress the disk image. Fix by reporting the exact length of the initrd image set, including any padding inserted between images but excluding any padding added at the end of the final image. Reported-by: Levente LEVAI <levail@aviatronic.hu> Signed-off-by: Michael Brown <mcb30@ipxe.org>
- Loading branch information
Showing
1 changed file
with
28 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters