Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #72043

Bug#989143: initramfs-tools: doesn’t actually compress with zstd

From Nicolas Schier <nicolas@fjasle.eu>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#989143: initramfs-tools: doesn’t actually compress with zstd
Date 2021-05-31 11:20 +0200
Message-ID <CkMfw-158-7@gated-at.bofh.it> (permalink)
References <Cj5FD-5yK-1@gated-at.bofh.it> <Cj5FD-5yK-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


Control: tags -1 + moreinfo

Hi Christoph,

> Just noted by coincidence, that even though I have set:
>   COMPRESS=zstd
> and zstd is installed and even runs (seen in e.g. top utility) when running
>   update-initramfs -u
> the files are in the end nevertheless plain cpio:
>   file /boot/initrd.img-5.10.0-7-amd64
>   /boot/initrd.img-5.10.0-7-amd64: ASCII cpio archive (SVR4 with no CRC)

I can see the same behaviour on my amd64 machine, but on my arm64 
system 'file' identifies the initramfs images as zstd archives:

   /boot/initrd.img-5.10.0-6-arm64: Zstandard compressed data (v0.8+), Dictionary ID: None

According to the last lines of /usr/sbin/mkinitramfs, there seems to be 
a non-compressed cpio at the top of your amd64's initrd.img which is 
followed by the zstd-compressed one.  To validate my argumentation, 
please set 'COMPRESS=gzip' in '/etc/initramfs-tools/initramfs.conf', 
run 'update-initramfs -u' again and compare the sizes of the (probably) 
zstd-compressed one with the gzip-compressed one.

On my amd64 machine, it looks like this:

   $ file initrd-*/*
   initrd-gzip-compressed/initrd.img-5.10.0-6-amd64: ASCII cpio archive (SVR4 with no CRC)
   initrd-zstd-compressed/initrd.img-5.10.0-6-amd64: ASCII cpio archive (SVR4 with no CRC)
   $ ls -hs initrd-*/*
   36M initrd-gzip-compressed/initrd.img-5.10.0-6-amd64
   28M initrd-zstd-compressed/initrd.img-5.10.0-6-amd64
.

Kind regards,
Nicolas


PS: Does anyone know, how to extract the second (aka compressed) cpio 
archive from the combined initrd.img?

Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#989143: initramfs-tools: doesn’t actually compress with zstd Christoph Anton Mitterer <calestyo@scientia.net> - 2021-05-26 19:40 +0200
  Bug#989143: initramfs-tools: doesn’t actually compress with zstd Nicolas Schier <nicolas@fjasle.eu> - 2021-05-31 11:20 +0200
    Bug#989143: initramfs-tools: doesn’t actually compress with zstd Christoph Anton Mitterer <calestyo@scientia.net> - 2021-05-31 16:40 +0200
  Processed: Re: Bug#989143: initramfs-tools: doesn’t  actually compress with zstd "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-05-31 11:20 +0200
  Processed: Re: Bug#989143: initramfs-tools: doesn’t  actually compress with zstd "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-05-31 16:40 +0200
  Bug#989143: marked as done (initramfs-tools: doesn’t  actually compress with zstd) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2021-06-05 16:30 +0200
  Bug#989143: initramfs-tools: doesn’t actually compress with zstd Christoph Anton Mitterer <calestyo@gmail.com> - 2021-06-05 17:00 +0200
    Bug#989143: initramfs-tools: doesn’t actually compress with zstd Ben Hutchings <ben@decadent.org.uk> - 2021-06-05 17:10 +0200
      Bug#989143: initramfs-tools: doesn’t actually compress with zstd Christoph Anton Mitterer <calestyo@scientia.net> - 2021-06-05 19:10 +0200

csiph-web