Uploaded image for project: 'RHEL'
  1. RHEL
  2. RHEL-4351

initramfs unpacking failed: uncompression error for certain initrd sizes

Linking RHIVOS CVEs to...Migration: Automation ...SWIFT: POC ConversionSync from "Extern...XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Undefined Undefined
    • None
    • rhel-8.0.0
    • grub2
    • None
    • Important
    • rhel-bootloader
    • ssg_display
    • 5
    • False
    • False
    • Hide

      None

      Show
      None
    • None
    • None
    • None
    • None
    • If docs needed, set a value
    • None
    • 57,005

      Description of problem:

      With a certain size of initrd, the kernel will print

      Initramfs unpacking failed: uncompression error
      or
      Initramfs unpacking failed: junk in compressed archive

      (and then panic as it won't be able to mount the initrd).

      I have tried to identify the problematic initrd sizes.
      Initrd of 429055538 bytes (and smaller) worked, 429061102 bytes and larger are broken, up to 463840156 bytes. 463841919 bytes and larger work properly again. This was with kernel vmlinuz-4.18.0-424.el8.x86_64. With kernels vmlinuz-5.14.0-162.el9.x86_64 and vmlinuz-5.14.0-70.13.1.el9_0.x86_64 (from RHEL 9) the problem persists, but the boundary between working and non-working initrd sizes shifts a bit.

      I am convinced that it is a problem with GRUB and not with the kernel or with the initrd generating tools (gzip, cpio), because installing GRUB from RHEL 7.9 avoids the problem (with the same kernel and initrd that have the problem on RHEL 8).

      I can reproduce the problem in RHEL 8.0 and the newest RHEL 8.7, also in RHEL 9.0 and 9.1.

      Version-Release number of selected component (if applicable):

      1:2.02-66.el8

      How reproducible:

      Well reproducible with a right initrd size, can be obtained by adding a large file with random data to the initrd.

      Steps to Reproduce:
      1. dd if=/dev/urandom of=/root/fill bs=1024 count=350000
      2. dracut -N --force --include /root/fill /usr/lib/fill /boot/initramfs-4.18.0-425.1.1.el8.x86_64.big.img
      3. in GRUB menu, change the boot entry to boot from /boot/initramfs-4.18.0-425.1.1.el8.x86_64.big.img instead of the default /boot/initramfs-4.18.0-425.1.1.el8.x86_64.img

      Actual results:
      Kernel panic, preceded by the message above

      Expected results:
      kernel+initrd should boot normally

      Additional info:

      The problem does not happen when booting with SYSLINUX. I was not able to reproduce it on UEFI machines, only on BIOS machines. I got a panic with sufficiently large initrd on popc64le (PowerVM with OpenFirmware) as well, but the boundary between working and non-working initrd size is different (initrd of size 393955235 was broken, 188900948 worked).

              bootloader-eng-team bootloader -eng-team
              rhn-support-pcahyna Pavel Cahyna
              bootloader -eng-team bootloader -eng-team
              Release Test Team Release Test Team
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: