Skip to content

Commit de2b857

Browse files
aafeijoo-suseddiss
authored andcommitted
feat(dracut.sh): check if target kernel has zstd support compiled in
If compression option is zstd, check if target kernel supports it. Otherwise, do not compress the initramfs image. (cherry picked from commit 591118c)
1 parent 6c4187a commit de2b857

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

dracut.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2398,6 +2398,11 @@ case $compress in
23982398
;;
23992399
esac
24002400
2401+
if [[ $compress == $DRACUT_COMPRESS_ZSTD* ]] && ! check_kernel_config CONFIG_RD_ZSTD; then
2402+
dwarn "dracut: kernel has no zstd support compiled in."
2403+
compress="cat"
2404+
fi
2405+
24012406
if ! (
24022407
umask 077
24032408
cd "$initdir"

0 commit comments

Comments
 (0)