File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,19 @@ _install_prerequisites() (
142142
143143 echo " Generating Linux kernel version string..."
144144 if [ " $TARGETARCH " = " arm64" ]; then
145- gunzip -c /lib/modules/${KERNEL_VERSION} /vmlinuz | strings | grep -E ' ^Linux version' | sed ' s/^\(.*\)\s\+(.*)$/\1/' > version
145+ # Download unzboot as kernel images are compressed in the zboot format on RHEL 9 arm64
146+ # unzboot is only available on the EPEL RPM repo
147+ dnf -q -y --releasever=${DNF_RELEASEVER} install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
148+ dnf config-manager --enable epel
149+ dnf -q -y --releasever=${DNF_RELEASEVER} install unzboot
150+
151+ if ! unzboot /lib/modules/${KERNEL_VERSION} /vmlinuz vmlinuz.out; then
152+ echo " Could not extract /lib/modules/${KERNEL_VERSION} /vmlinuz" >&2
153+ return 1
154+ fi
155+
156+ < vmlinuz.out strings | grep -E ' ^Linux version' | sed ' s/^\(.*\)\s\+(.*)$/\1/' > version
157+ rm vmlinuz.out
146158 else
147159 extract-vmlinux /lib/modules/${KERNEL_VERSION} /vmlinuz | strings | grep -E ' ^Linux version' | sed ' s/^\(.*\)\s\+(.*)$/\1/' > version
148160 fi
You can’t perform that action at this time.
0 commit comments