Bug 1554931

Summary: compress should default to zstd
Product: [Fedora] Fedora Reporter: Harald Reindl <h.reindl>
Component: dracutAssignee: dracut-maint-list
Status: NEW --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dracut-maint-list, harald, jonathan, laszlo.gombos, robinlee.sysu, teohhanhui, travier, zbyszek
Target Milestone: ---Keywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Harald Reindl 2018-03-13 15:20:15 UTC
bseides a ton of useless modules (https://bugzilla.redhat.com/show_bug.cgi?id=873220 and there is also a lot of hid-stuff) since all kernel modules on Fedora are .ko.xz "Depending on what you pass, this may result in an initramfs that the kernel cannot decompres" don't apply 

[root@testserver:/etc/dracut.conf.d]$ cat 95-compress.conf
compress="xz"

8.2 MB versus 11 MB on a Fedora Vmware guest

[root@testserver:/etc/dracut.conf.d]$ ls /boot/
insgesamt 42M
drwxr-xr-x 18 root root 1,0K 2018-03-12 20:18 b3591cfc6c4e65ea231a7d08489dc40f
drwxr-xr-x  3 root root 1,0K 2018-01-22 12:23 efi
drwx------  6 root root 1,0K 2018-03-12 20:18 grub2
drwx------  2 root root 1,0K 2013-11-01 03:29 lost+found
-rw-------  1 root root  11M 2018-03-10 21:25 initramfs-4.15.8-300.fc27.x86_64.img
-rw-------  1 root root 8,2M 2018-03-13 16:12 initramfs-4.15.9-300.fc27.x86_64.img
-rw-r--r--  1 root root 190K 2018-03-09 19:31 config-4.15.8-300.fc27.x86_64
-rw-r--r--  1 root root 190K 2018-03-12 18:27 config-4.15.9-300.fc27.x86_64
-rw-------  1 root root 3,7M 2018-03-09 19:31 System.map-4.15.8-300.fc27.x86_64
-rw-------  1 root root 3,7M 2018-03-12 18:27 System.map-4.15.9-300.fc27.x86_64
-rwxr-xr-x  1 root root 7,9M 2018-03-09 19:32 vmlinuz-4.15.8-300.fc27.x86_64
-rwxr-xr-x  1 root root 7,9M 2018-03-12 18:29 vmlinuz-4.15.9-300.fc27.x86_64

Comment 1 Ben Cotton 2018-11-27 16:39:16 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 2 Harald Reindl 2018-11-27 17:13:21 UTC
compress="xz" even don't work currently, the initrd is created but kernel panic on boot in a VM

Comment 3 Harald Reindl 2018-11-27 17:14:16 UTC
forget the last comment - that was for zstd - which would be probaly the best default from all if it would work

Comment 4 Harald Hoyer 2018-12-05 09:35:57 UTC
Well .xz is smaller, but .gz is faster on boot time. It's always a tradeoff.

Comment 5 Ben Cotton 2019-05-02 20:10:20 UTC
This message is a reminder that Fedora 28 is nearing its end of life.
On 2019-May-28 Fedora will stop maintaining and issuing updates for
Fedora 28. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora 'version' of '28'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 28 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 6 Zbigniew Jędrzejewski-Szmek 2019-05-04 16:47:38 UTC
Let's update this to "zstd". I'm pretty sure that zstd will have comparable
compression to xz while being reasonably fast.

Comment 7 Harald Reindl 2019-05-04 16:52:36 UTC
agreed, but the last time i tried it didn't produce a working initrd at all

Comment 8 Timothée Ravier 2024-05-31 10:25:10 UTC
Fedora CoreOS has been using zstd compressed initramfs for a while now and without issues:
- https://github.com/coreos/fedora-coreos-config/pull/1844
- https://github.com/coreos/fedora-coreos-config/blob/testing-devel/overlay.d/05core/usr/lib/dracut/dracut.conf.d/coreos-zstd.conf

Comment 10 Timothée Ravier 2025-02-06 16:30:42 UTC
This has been merged upstream for a while now and should be in the version of dracut in Fedora. Could someone verify if it's the case?

Comment 11 Timothée Ravier 2025-02-10 17:17:16 UTC
Looks like it's not on in Fedora because dracut does not requires/recommends zstd yet: https://src.fedoraproject.org/rpms/dracut/blob/rawhide/f/dracut.spec#_87

Comment 12 Timothée Ravier 2025-06-24 13:24:31 UTC
Change proposal: https://fedoraproject.org/wiki/Changes/InitrdZstdDefault