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

2021-06-05 Thread Christoph Anton Mitterer
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.



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

2021-06-05 Thread Ben Hutchings
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'


signature.asc
Description: This is a digitally signed message part


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

2021-06-05 Thread Christoph Anton Mitterer
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.



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

2021-05-31 Thread Christoph Anton Mitterer
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.



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

2021-05-31 Thread Nicolas Schier
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?



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

2021-05-26 Thread Christoph Anton Mitterer
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: 

-- /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-base4.6

initramfs-tools recommends no packages.

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

-- no debconf information