From 04420b2509c334c152a35acdaf9039d49190776c Mon Sep 17 00:00:00 2001 From: Joe Zheng Date: Thu, 8 May 2025 14:49:47 +0800 Subject: [PATCH] extract the .zst kernal modules the latest Ubuntu use .zst compressed kernel modules, but the modprobe in busybox doesn't support this, so extract them first --- initramfs/initramfs_create | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/initramfs/initramfs_create b/initramfs/initramfs_create index 9a82361c..0843605b 100755 --- a/initramfs/initramfs_create +++ b/initramfs/initramfs_create @@ -135,8 +135,9 @@ copy_including_deps /$LMK/modules.* copy_including_deps /usr/share/terminfo/l/linux -find $INITRAMFS -name "*.ko.gz" -exec gunzip {} \; -find $INITRAMFS -name "*.ko.xz" -exec xz -d {} \; +find $INITRAMFS \( -name '*.gz' -exec gunzip {} \; \ + -o -name '*.xz' -exec unxz {} \; \ + -o -name '*.zst' -exec unzstd --rm {} \; \) # trim modules.order file. Perhaps we could remove it entirely MODULEORDER="$(cd "$INITRAMFS/$LMK/"; find -name "*.ko" | sed -r "s:^./::g" | tr "\n" "|" | sed -r "s:[.]:.:g")"