1

I have issues while customizing ubuntu 20.04. When I made a new initrd for booting (iso/casper/initrd), I got this error:

initramfs unpacking failed: Decoding failed

then dropped into initramfs shell.

I found some posts describing this issue, like

https://bugs.launchpad.net/ubuntu/+source/ubuntu-meta/+bug/1870260 https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1835660

So I changed the initramfs.conf to setup the COMPRESS=gzip in the (chrooted) squashfs live filesystem, and use

mkinitrd -o initrd 5.4.0-33-generic

Also followed the instructions to customize the initramfs: https://askubuntu.com/questions/1094854/how-to-modify-initrd-initial-ramdisk-of-ubuntu-18-10-cosmic-cuttlefish

then put it into iso/casper/initrd

However it did not solve my issue. It didn't show the error messages, but still directly throw me into initramfs. I.e., it does not go to the plymouth and ubiquity, just stopped in the initramfs shell.

No messages. The more (busybox) in the initramfs does not work so I couldn't see in detail the dmesg log either.

Any help and suggestions will be appreciated, including how I can debug such condition, or what should I do to make gzip compressed initramfs work.

2 Answers 2

1

I found the answer myself.

The reason it dropped into the shell instead of running plymouth is that, in any new generated initrd, there is no "default-boot-to-casper.conf" file in conf/conf.d. This file indicates the boot loader to boot from casper not HDD since it is a live system. In the native Ubuntu iso/casper/initrd this file exists when extracting. However it does not exist in the squashfs live filesystem, so any new generated initrd.img would fail to boot from casper.

Put the content

if [ -z "$BOOT" ]; then
    export BOOT=casper
fi

into /etc/initramfs-tools/conf.d/default-boot-to-casper.conf then generate the initrd, no matter with lz4 or gzip compression method it would succeed to boot, though the "Decoding failed" would still be shown when using lz4 but it could still boot.

1

Franklin, I am having the same issue when trying to run a live version of Ubuntu Studio 20.04 in a new desktop created with UNetbootin... "initramfs unpacking failed: Decoding failed".

However, if I take the live USB stick and run it in a different computer, it runs fine without a problem leading me to believe that my problem might be different.

Any ideas?

1
  • In my case even this message was shown it could still run without problem. Still not sure why this messages would be shown, and I also wonder if in your live USB stick you just didn't see the messages. Maybe you can check with dmesg to see if it was there or not.
    – Franklin
    Jun 26, 2020 at 4:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .