How to extract initrd from ubuntu-20.04-live-server-amd64.iso
/usr/sbin/update-initramfs calls /usr/sbin/mkinitramfs, which calls
cpio --quiet -R 0:0 --reproducible -o -H newc | lz4 -9 -l
where the lz4 is coming from /etc/initramfs-tools/initramfs.conf
reversing that into
cat /boot/initrd.img-5.4.0-26-generic | unlz4 -9 -l | cpio -i -H newc
fails though.
cat /boot/initrd.img-5.4.0-26-generic | file -
/dev/stdin: ASCII cpio archive (SVR4 with no CRC)
keeps persisting it's a cpio archive, but
cat /boot/initrd.img-5.4.0-26-generic | cpio -i -H newc
still ends up in the same AuthenticAMD.bin. Maybe somebody else can build on this?
Edit: nope. According to https://unix.stackexchange.com/a/511224/44864 The answer is
unmkinitramfs -v initrd.img-5.4.0-26-generic .
Same problem here -- the solution was to not unpack with Ubuntu version 20.04 using unmkinitramfs.
I created a bootable USB and booted my machine into Ubuntu 20 -- unmkinitramfs was then able to unpack the initrd. I'm still finding my way around building a new bootable USB that doesn't autologin (and works correctly with casper-rw).
If you want to see more about what unmkinitramfs does, it's a bash script. In a comparison between Bionic and Focal, Bionic does not supprt lz4 compression.