Results 1 to 3 of 3

Thread: Customization: initramfs failed to be unpacked

  1. #1
    Join Date
    Sep 2012

    Customization: initramfs failed to be unpacked

    Hi, I'm doing customization from (k/x/L)ubuntu to our own distributions for promoting FOSS and educational use. We've done it for many years since Ubuntu 6.06.

    Before Ubuntu 18.04.1 the initrd inside the iso/casper has its own filesystem structures and we can customize (or copy from live file system) and use cpio and lzma to create an initrd.lz for boot to use.
    Since 18.04.4 (maybe?) the structure of casper/initrd is changed. when using cpio -i < initrd it could no longer show the whole init ramdisk.

    So at that time I extract the live file system (filesystem.squashfs) and then chroot into it, mount /proc /sys /dev/pts, and use mkinitrams -o initrd <kernel_version> and the generated initrd is useful.

    When I tried it with 20.04 I got some problems. Please see what I've tried:

    I found that using the same way the generated initrd couldn't be booted. It would show "initramfs unpacking failed: Decoding fail". I googled a bit and found a solution saying that changing the compress method from lz4 to gzip would solve this issue. However, when I tried with gzip (or lzma) it would not show the error messages; instead it just directly jump into initramfs, not booting the kernel.

    In the pastebin:
    Line 31: Get filesystem.squashfs from iso/casper, and extract it in Line 75
    Line 99: chroot into the live filesystem, then mount /proc, /sys, /dev/pts
    Line 116: use mkinitramfs to generate an initrd in the root of live filesystem
    Line 118: During the generation of initrd, it showed cryptsetup ERROR: couldn't resolve device /dev/sda6 <-- no idea why sda6
    Line 119: umount /proc /sys /dev/pts
    Line 123: Put the generated initrd into iso/casper, and put live filesystem squashfs into casper/ too
    Line 128: Regenerate iso file

    The screenshot is at:

    Any help and suggestion will be highly appreciated. Thanks.

  2. #2
    Join Date
    Mar 2010

    Re: Customization: initramfs failed to be unpacked

  3. #3
    Join Date
    Apr 2008
    Southern California, USA
    Ubuntu Development Release

    Re: Customization: initramfs failed to be unpacked

    That error message is a Red Herring. Look at my bug report, and several developers stated as such.
    We get that same message even on gorilla ISO's, and it still boots. Something else is causing the issue.
    I went though your re-creation and nothing stands out. Besides this worked for you in the past.

    Its been a long time since I compiled a kernel. So this all worked on 18.04 release, but not since updates?
    You might try the 20.04 kernel just to be sure.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts