[Bug 1999881] Re: unmkinitramfs fails with symlinked zstd compressed initrds

Flauschie 1999881 at bugs.launchpad.net
Wed Aug 16 12:40:14 UTC 2023


Can this be reopened or do I need to make a new report? This might work
for ubuntu22 but not ubuntu20. I need to repack the initrd to include
proper usbc/manufacturer drivers from the squashfs for network installs.
I cannot upgrade the runner to ubuntu22.

Ubuntu 20.04.5 LTS
5.4.0-148-generic
initramfs-tools 0.136ubuntu6.7


sudo mount -o loop ubuntu-22.04.3-live-server-amd64.iso /tmp/isofile2

---

unmkinitramfs /tmp/isofile2/casper/initrd /tmp/initrd/
cpio: premature end of archive

---

lsinitramfs /tmp/isofile2/casper/initrd
.
kernel
kernel/x86
kernel/x86/microcode
kernel/x86/microcode/AuthenticAMD.bin
kernel
kernel/x86
kernel/x86/microcode
kernel/x86/microcode/.enuineIntel.align.0123456789abc
kernel/x86/microcode/GenuineIntel.bin
cpio: premature end of archive

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to initramfs-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1999881

Title:
  unmkinitramfs fails with symlinked zstd compressed initrds

Status in initramfs-tools package in Ubuntu:
  Expired

Bug description:
  [Impact]

   * Cannot unpack zstd compressed initrds when accessed through a
  symbolic link

  [Test Case]

  $ grep COMPRESS= /etc/initramfs-tools/initramfs.conf
  COMPRESS=zstd
  # This is the default

  $ stat -c '%F %N' /boot/initrd.img*
  symbolic link '/boot/initrd.img' -> 'initrd.img-5.15.0-53-generic'
  regular file '/boot/initrd.img-5.15.0-53-generic'

  $ lsinitramfs /boot/initrd.img-5.15.0-53-generic
  ... works as expected ...

  $ lsinitramfs /boot/initrd.img
  cpio: premature end of archive

  [Regression Potential]

   * Ubuntu Jammy changes the default compression scheme for the initrd
  from lz4 to zstd. Unpacking lz4 initrds had already been fixed by
  https://bugs.launchpad.net/ubuntu/cosmic/+source/initramfs-
  tools/+bug/1832108 but unpacking zstd initrds works as expected when
  directly accessing the file. However, it fails when accessing it
  through a symbolic link.

  [Other Info]

  A fix proposal is attached.

  $ lsb_release -rd
  Description:	Ubuntu 22.04.1 LTS
  Release:	22.04
  $ dpkg-query -W initramfs-tools
  initramfs-tools	0.140ubuntu13

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1999881/+subscriptions




More information about the foundations-bugs mailing list