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


Groups > linux.debian.kernel > #71892 > unrolled thread

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

Started byChristoph Anton Mitterer <calestyo@scientia.net>
First post2021-05-26 19:40 +0200
Last post2021-06-05 19:10 +0200
Articles 9 — 5 participants

Back to article view | Back to linux.debian.kernel


Contents

  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

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

FromChristoph Anton Mitterer <calestyo@scientia.net>
Date2021-05-26 19:40 +0200
SubjectBug#989143: initramfs-tools: doesn’t actually compress with zstd
Message-ID<Cj5FD-5yK-1@gated-at.bofh.it>
Package: initramfs-tools
Version: 0.140
Severity: normal


Hey.

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)


Cheers,
Chris.



-- Package-specific info:
-- initramfs sizes
-rw-r--r-- 1 root root 24M May 14 13:47 /boot/initrd.img-5.10.0-6-amd64
-rw-r--r-- 1 root root 24M May 26 19:21 /boot/initrd.img-5.10.0-7-amd64
-- /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.10.0-7-amd64 root=/dev/mapper/system ro rootflags=subvol=root random.trust_cpu=off luks.crypttab=no

-- /proc/filesystems
	btrfs
	fuseblk

-- /etc/initramfs-tools/modules
usb-storage
xhci-hcd
xhci-pci
ehci-hcd
ehci-pci
uhci-hcd
btrfs

-- /etc/initramfs-tools/initramfs.conf
MODULES=dep
BUSYBOX=auto
KEYMAP=n
COMPRESS=zstd
DEVICE=
NFSROOT=auto
RUNSIZE=10%
FSTYPE=auto

-- /etc/initramfs-tools/update-initramfs.conf
update_initramfs=yes
backup_initramfs=no

-- /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10] 
unused devices: <none>

-- /sys/block
dm-0
loop0
loop1
loop2
loop3
loop4
loop5
loop6
loop7
sda

/usr/share/initramfs-tools/hooks:
btrfs
cryptgnupg
cryptgnupg-sc
cryptkeyctl
cryptopensc
cryptpassdev
cryptroot
cryptroot-unlock
dmsetup
fsck
fuse
intel_microcode
keymap
klibc-utils
kmod
lvm2
mdadm
nbd
ntfs_3g
reiserfsprogs
resume
thermal
thin-provisioning-tools
udev
v86d
xfs
zz-busybox


-- System Information:
Debian Release: 11.0
  APT prefers unstable-debug
  APT policy: (500, 'unstable-debug'), (500, 'unstable')
Architecture: amd64 (x86_64)

Kernel: Linux 5.10.0-7-amd64 (SMP w/4 CPU threads)
Kernel taint flags: TAINT_WARN
Locale: LANG=en_DE.UTF-8, LC_CTYPE=en_DE.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)

Versions of packages initramfs-tools depends on:
ii  initramfs-tools-core  0.140
ii  linux-base            4.6

initramfs-tools recommends no packages.

Versions of packages initramfs-tools suggests:
ii  bash-completion  1:2.11-2

-- no debconf information

[toc] | [next] | [standalone]


#72043

FromNicolas Schier <nicolas@fjasle.eu>
Date2021-05-31 11:20 +0200
Message-ID<CkMfw-158-7@gated-at.bofh.it>
In reply to#71892
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?

[toc] | [prev] | [next] | [standalone]


#72048

FromChristoph Anton Mitterer <calestyo@scientia.net>
Date2021-05-31 16:40 +0200
Message-ID<CkRfc-40D-5@gated-at.bofh.it>
In reply to#72043
Control: tags -1 - moreinfo

On Mon, 2021-05-31 at 11:08 +0200, Nicolas Schier wrote:
> 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.

That gives:

With zstd:
# file initrd*
initrd.img-5.10.0-7-amd64: ASCII cpio archive (SVR4 with no CRC)

# l initrd*
-rw-r--r-- 1 root root 26M May 30 06:21 initrd.img-5.10.0-7-amd64


Changing to gzip:
# update-initramfs -u
...


# file initrd*
initrd.img-5.10.0-7-amd64: ASCII cpio archive (SVR4 with no CRC)

# l initrd*
-rw-r--r-- 1 root root 33M May 31 15:54 initrd.img-5.10.0-7-amd64


Cheers,
Chris.

[toc] | [prev] | [next] | [standalone]


#72045 — Processed: Re: Bug#989143: initramfs-tools: doesn’t actually compress with zstd

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-05-31 11:20 +0200
SubjectProcessed: Re: Bug#989143: initramfs-tools: doesn’t actually compress with zstd
Message-ID<CkMfw-158-5@gated-at.bofh.it>
In reply to#71892
Processing control commands:

> tags -1 + moreinfo
Bug #989143 [initramfs-tools] initramfs-tools: doesn’t actually compress with zstd
Added tag(s) moreinfo.

-- 
989143: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989143
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#72047 — Processed: Re: Bug#989143: initramfs-tools: doesn’t actually compress with zstd

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-05-31 16:40 +0200
SubjectProcessed: Re: Bug#989143: initramfs-tools: doesn’t actually compress with zstd
Message-ID<CkRfc-40D-7@gated-at.bofh.it>
In reply to#71892
Processing control commands:

> tags -1 - moreinfo
Bug #989143 [initramfs-tools] initramfs-tools: doesn’t actually compress with zstd
Removed tag(s) moreinfo.

-- 
989143: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989143
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#72106 — Bug#989143: marked as done (initramfs-tools: doesn’t actually compress with zstd)

From"Debian Bug Tracking System" <owner@bugs.debian.org>
Date2021-06-05 16:30 +0200
SubjectBug#989143: marked as done (initramfs-tools: doesn’t actually compress with zstd)
Message-ID<CmFti-4is-13@gated-at.bofh.it>
In reply to#71892

[Multipart message — attachments visible in raw view] — view raw

Your message dated Sat, 05 Jun 2021 16:23:05 +0200
with message-id <83755c3f7422618d1c47b3b1713141d61c8b1155.camel@decadent.org.uk>
and subject line Re: Bug#989143: initramfs-tools: doesn’t actually compress with zstd
has caused the Debian Bug report #989143,
regarding initramfs-tools: doesn’t actually compress with zstd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
989143: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=989143
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems

[toc] | [prev] | [next] | [standalone]


#72107

FromChristoph Anton Mitterer <calestyo@gmail.com>
Date2021-06-05 17:00 +0200
Message-ID<CmFWh-4rz-1@gated-at.bofh.it>
In reply to#71892
On Sat, 2021-06-05 at 16:23 +0200, Ben Hutchings wrote:
> You have intel-microcode installed, which prepends an uncompressed
> initramfs.  Not a bug.

Couldn't it then just skip the compression altogether?

Cheers,
Chris.

[toc] | [prev] | [next] | [standalone]


#72108

FromBen Hutchings <ben@decadent.org.uk>
Date2021-06-05 17:10 +0200
Message-ID<CmG5X-4Kd-1@gated-at.bofh.it>
In reply to#72107

[Multipart message — attachments visible in raw view] — view raw

On Sat, 2021-06-05 at 16:49 +0200, Christoph Anton Mitterer wrote:
> On Sat, 2021-06-05 at 16:23 +0200, Ben Hutchings wrote:
> > You have intel-microcode installed, which prepends an uncompressed
> > initramfs.  Not a bug.
> 
> Couldn't it then just skip the compression altogether?

You mean, can the main initramfs be uncompressed?  I'm not sure whether
the kernel supports that.  It's certainly not an option in initramfs-
tools at the moment.

Ben.

-- 
Ben Hutchings
Kids!  Bringing about Armageddon can be dangerous.  Do not attempt it
in your own home. - Terry Pratchett and Neil Gaiman, `Good Omens'

[toc] | [prev] | [next] | [standalone]


#72109

FromChristoph Anton Mitterer <calestyo@scientia.net>
Date2021-06-05 19:10 +0200
Message-ID<CmHY5-5Qo-1@gated-at.bofh.it>
In reply to#72108
On Sat, 2021-06-05 at 16:59 +0200, Ben Hutchings wrote:
> You mean, can the main initramfs be uncompressed?  I'm not sure
> whether
> the kernel supports that.  It's certainly not an option in initramfs-
> tools at the moment.

Forget it... I'm stupid ^^ ... it's just the microcode, that's
uncompressed, while the rest is.


Thanks,
Chris.

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.kernel


csiph-web