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

Benjamin Drung 1999881 at bugs.launchpad.net
Wed Aug 16 13:16:50 UTC 2023


This bug report can be re-opened if needed. I tried to reproduce the
failure on Ubuntu 20.04 (focal) with initramfs-tools 0.136ubuntu6.7, but
I still cannot reproduce it:

```
$ schroot-wrapper -p linux-image-generic,initramfs-tools,zstd -u root -c focal
(focal)root at host:~# echo COMPRESS=zstd > /etc/initramfs-tools/conf.d/compress
(focal)root at host:~# update-initramfs -u
update-initramfs: Generating /boot/initrd.img-5.4.0-156-generic
(focal)root at host:~# lsinitramfs /boot/initrd.img
[...]
usr/sbin/rmmod
usr/sbin/wait-for-root
```

-- 
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