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>tags/v1.20.1
|
|
||
346 |
|
346 |
|
347 |
|
347 |
|
348 |
|
348 |
|
|
349 |
|
|
|
350 |
|
|
|
351 |
|
|
|
352 |
|
|
|
353 |
|
|
|
354 |
|
|
|
355 |
|
|
|
356 |
|
|
|
357 |
|
|
|
358 |
|
|
|
359 |
|
|
349 |
|
360 |
|
350 |
|
361 |
|
351 |
|
362 |
|
352 |
|
363 |
|
353 |
|
364 |
|
354 |
|
365 |
|
355 |
|
|
|
|
366 |
|
|
356 |
|
367 |
|
357 |
|
368 |
|
358 |
|
369 |
|
|
|
||
408 |
|
419 |
|
409 |
|
420 |
|
410 |
|
421 |
|
411 |
|
|
|
|
422 |
|
|
412 |
|
423 |
|
413 |
|
424 |
|
414 |
|
425 |
|
415 |
|
|
|
416 |
|
426 |
|
417 |
|
427 |
|
418 |
|
428 |
|
|
|
||
440 |
|
450 |
|
441 |
|
451 |
|
442 |
|
452 |
|
|
453 |
|
|
443 |
|
454 |
|
444 |
|
455 |
|
445 |
|
456 |
|
|
|
||
487 |
|
498 |
|
488 |
|
499 |
|
489 |
|
500 |
|
|
501 |
|
|
490 |
|
502 |
|
491 |
|
503 |
|
492 |
|
504 |
|
|
|
||
505 |
|
517 |
|
506 |
|
518 |
|
507 |
|
519 |
|
508 |
|
|
|
509 |
|
|
|
510 |
|
|
|
|
520 |
|
|
511 |
|
521 |
|
512 |
|
522 |
|
513 |
|
523 |
|
|
|
||
519 |
|
529 |
|
520 |
|
530 |
|
521 |
|
531 |
|
522 |
|
|
|
|
532 |
|
|
523 |
|
533 |
|
524 |
|
534 |
|
525 |
|
|
|
526 |
|
|
|
|
535 |
|
|
|
536 |
|
|
|
537 |
|
|
527 |
|
538 |
|
528 |
|
539 |
|
529 |
|
540 |
|
530 |
|
|
|
531 |
|
|
|
|
541 |
|
|
|
542 |
|
|
532 |
|
543 |
|
533 |
|
544 |
|
534 |
|
|
|
|
545 |
|
|
535 |
|
546 |
|
536 |
|
|
|
537 |
|
|
|
|
547 |
|
|
|
548 |
|
|
538 |
|
549 |
|
|
550 |
|
|
|
551 |
|
|
|
552 |
|
|
539 |
|
553 |
|
540 |
|
554 |
|
541 |
|
555 |
|