Bugzilla – Bug 1171180
get_kernel_version fails to handle zImage on armv7
Last modified: 2022-03-09 00:03:49 UTC
# get_kernel_version /boot/zImage-5.6.8-1-default ; echo $? 1 # get_kernel_version /boot/vmlinux-5.6.8-1-default.xz ; echo $? 1 # mkinitrd No kernel found in /boot or bad modules dir in /lib/modules
@Andreas, could you try with this pending update: https://build.opensuse.org/request/show/794073
# get_kernel_version /boot/zImage-5.6.8-1-default ; echo $? 1 panda:~/:[0]# get_kernel_version /boot/vmlinux-5.6.8-1-default.xz ; echo $? 5.6.8-1-default 0 panda:~/:[0]# mkinitrd No kernel found in /boot or bad modules dir in /lib/modules
(In reply to Andreas Schwab from comment #2) > # get_kernel_version /boot/zImage-5.6.8-1-default ; echo $? > 1 > panda:~/:[0]# get_kernel_version /boot/vmlinux-5.6.8-1-default.xz ; echo $? > 5.6.8-1-default > 0 Partially fixed then. > panda:~/:[0]# mkinitrd > No kernel found in /boot or bad modules dir in /lib/modules Any reason you do not use 'dracut' instead of mkinitrd? Could you try 'dracut' instead, please?
Because that's what everyone is using.
(In reply to Andreas Schwab from comment #4) > Because that's what everyone is using. mkinitrd is just a wrapper around dracut. On kernel update, dracut is used nowadays. @Andreas, could you confirm that dracut is working properly, please?
# /usr/lib/module-init-tools/regenerate-initrd-posttrans No kernel found in /boot or bad modules dir in /lib/modules
I see this issue as well. As written in comment 6, mkinitrd is still used to regenerate the initrd on package updates.
For $(uname -m) ~= "arm*", mkinitrd only looks at /boot/[uz]Image-* and generates s/[uz]Image/initrd/ files. So AFAICT get_kernel_version has to be fixed for zImage as well.
The following diff make mkinitrd to run properly on armv7: ********** --- /sbin/mkinitrd 2021-01-20 14:29:44.886464086 +0000 +++ mkinitrd-suse.sh 2021-01-20 14:28:30.041163391 +0000 @@ -199,7 +199,6 @@ default_kernel_images() { kernel_version=$(kernel_version_from_image \ $boot_dir/$kernel_image 2> /dev/null) - [ -z $kernel_version ] && kernel_version=${kernel_image#zImage-} initrd_image=$(echo $kernel_image | sed -e "s|${regex}|initrd|") if [ "$kernel_image" != "$initrd_image" -a \ -n "$kernel_version" -a \ ********** Not sure how upstreamable it is, though.
I guess that patch is reversed, right? the other option is to fix our kernel image name to no longer be called zImage, but instead similar to all other distributions inherit the x86 name. this might be not so difficult to pull off, and it fixes dracut and all other occurences where we need to fix stuff (I remember other unfixed cases in virtualization and containerization area). I would prefer that over finding more places to hack.
(In reply to Dirk Mueller from comment #10) > I guess that patch is reversed, right? Yes. > > the other option is to fix our kernel image name to no longer be called > zImage, but instead similar to all other distributions inherit the x86 name. Last time I checked, other distributions used zImage as well. > this might be not so difficult to pull off, and it fixes dracut and all > other occurences where we need to fix stuff (I remember other unfixed cases > in virtualization and containerization area). I would prefer that over > finding more places to hack. Dracut should be fine. With such a change, we likely need to fix stuff in working things.
mkinitrd is no longer a thing. Is this a problem with dracut?
See #c6.
Why does it not work? The code seems to match zImage: default_kernel_images() { local regex kernel_image kernel_version version_version initrd_image local qf='%{NAME}-%{VERSION}-%{RELEASE}\n' case "${DRACUT_ARCH:-$(uname -m)}" in s390|s390x) regex='image' ;; ppc|ppc64) regex='vmlinux' ;; i?86|x86_64) regex='vmlinuz' ;; arm*) regex='[uz]Image' ;; aarch64|riscv64) regex='Image' ;; *) regex='vmlinu.' ;; esac
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: create_hdd_minimalx https://openqa.opensuse.org/tests/1808868 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The label in the openQA scenario is removed
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: create_hdd_minimalx https://openqa.opensuse.org/tests/1838553 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The label in the openQA scenario is removed
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: create_hdd_minimalx https://openqa.opensuse.org/tests/1858645 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The label in the openQA scenario is removed
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: create_hdd_minimalx https://openqa.opensuse.org/tests/1876432 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The label in the openQA scenario is removed
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: extra_tests_in_textmode https://openqa.opensuse.org/tests/1892144 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The label in the openQA scenario is removed
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: extra_tests_in_textmode https://openqa.opensuse.org/tests/1913292 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The bugref in the openQA scenario is removed or replaced, e.g. `label:wontfix:boo1234`
This is an autogenerated message for openQA integration by the openqa_review script: This bug is still referenced in a failing openQA test: extra_tests_in_textmode https://openqa.opensuse.org/tests/2234218 To prevent further reminder comments one of the following options should be followed: 1. The test scenario is fixed by applying the bug fix to the tested product or the test is adjusted 2. The openQA job group is moved to "Released" or "EOL" (End-of-Life) 3. The bugref in the openQA scenario is removed or replaced, e.g. `label:wontfix:boo1234` Expect the next reminder at the earliest in 56 days if nothing changes in this ticket.