Compress initramfs with zstd

See: https://gitlab.com/fedora/ostree/sig/-/issues/34
This commit is contained in:
Timothée Ravier 2024-06-11 18:48:09 +02:00
parent dbf2b98a93
commit 030cffc069
2 changed files with 23 additions and 0 deletions

View file

@ -17,6 +17,8 @@ include:
- sysroot-ro.yaml
# Workaround for https://github.com/fedora-silverblue/issue-tracker/issues/587
- grub2-workaround.yaml
# Compress initramfs with zstd
- initramfs-zstd.yaml
# systemd-pcrphase module fails on ppc64le:
# https://gitlab.com/fedora/ostree/sig/-/issues/44

21
initramfs-zstd.yaml Normal file
View file

@ -0,0 +1,21 @@
# Initramfs compression with zstd
packages:
- zstd
postprocess:
- |
#!/usr/bin/env bash
set -xeuo pipefail
install -dm 0755 -o 0 -g 0 /usr/lib/dracut/dracut.conf.d
- |
#!/usr/bin/env bash
set -xeuo pipefail
cat > /usr/lib/dracut/dracut.conf.d/20-atomic-zstd.conf << 'EOF'
# Compress initrd with zstd. dracut defaults to -15, but we want the
# maximum reasonable compression, so override the command line to use
# dracut's defaults along with -19.
compress="zstd -19 -q -T0"
EOF