Hide Forgot
Description of problem: .qa.[root@s390x-6s-v1 boot]# file vmlinuz-2.6.32-71.18.2.el6.s390x vmlinuz-2.6.32-71.18.2.el6.s390x: data .qa.[root@s390x-6s-v1 boot]# file vmlinuz-2.6.32-71.18.2.el6.s390x.debug vmlinuz-2.6.32-71.18.2.el6.s390x.debug: data Version-Release number of selected component (if applicable): file-5.04-6.el6.s390x How reproducible: always Steps to Reproduce: 1. run file on s390x vmlinuz file (compressed kernel image) 2. 3. Actual results: on s/390x: file vmlinuz-2.6.32-71.18.2.el6.s390x vmlinuz-2.6.32-71.18.2.el6.s390x: data on x86_64: file /boot/vmlinuz-2.6.32-71.el6.x86_64 /boot/vmlinuz-2.6.32-71.el6.x86_64: Linux kernel x86 boot executable bzImage, version 2.6.32-71.el6.x86_64 (mockbuild, RO-rootFS, root_dev 0x901, swap_dev 0x3, Normal VGA Expected results: something similar to output present on x86_64 Additional info: This issue seems to be limited to s/390x
Created attachment 486749 [details] proposed patch
This patch adds basic support for s390x kernel detection. I think it's not possible to print kernel version easily, because there's no pointer to version string in s390x kernel header. This is example output with the patch applied: file ~/vmlinuz-2.6.38-1.fc15.s390x -m linux /home/hanzz/vmlinuz-2.6.38-1.fc15.s390x: Linux S390 Z9-109 64bit kernel
Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to this update, the file utility did not correctly recognized the IBM System z kernel images. This problem has been corrected so that the IBM System z kernel images are now correctly recognized as expected.
There seems to be a regression intruduces by this patch (or any other patch applied after file-5.04-6.el6). # rpm -q file file-5.04-6.el6.s390x # file /boot/vmlinuz* /boot/vmlinuz-2.6.32-131.4.1.el6.s390x: data /boot/vmlinuz-2.6.32-131.4.1.el6.s390x.debug: data /boot/vmlinuz-2.6.32-131.4.1.el6.s390x.kdump: data /boot/vmlinuz-2.6.32-71.el6.s390x: data /boot/vmlinuz-2.6.32-71.el6.s390x.debug: data /boot/vmlinuz-2.6.32-71.el6.s390x.kdump: data # rpm -q file file-5.04-9.el6.s390x # file /boot/vmlinuz* /boot/vmlinuz-2.6.32-131.4.1.el6.s390x: Linux S390 Z9-109 64bit kernel /boot/vmlinuz-2.6.32-131.4.1.el6.s390x.debug: Linux S390 Z9-109 64bit kernel /boot/vmlinuz-2.6.32-131.4.1.el6.s390x.kdump: Applesoft BASIC program data /boot/vmlinuz-2.6.32-71.el6.s390x: Linux S390 Z9-109 64bit kernel /boot/vmlinuz-2.6.32-71.el6.s390x.debug: Linux S390 Z9-109 64bit kernel /boot/vmlinuz-2.6.32-71.el6.s390x.kdump: Applesoft BASIC program data # dd if=/boot/vmlinuz-2.6.32-71.el6.s390x.kdump of=vmlinuz_kdump.head bs=1 count=4 4+0 records in 4+0 records out 4 bytes (4 B) copied, 0.00192344 s, 2.1 kB/s # file vmlinuz_kdump.head vmlinuz_kdump.head: Applesoft BASIC program data # hexdump vmlinuz_kdump.head 0000000 0008 0000 0000004 Btw, pppc64 kernel is also not detected as a Linux kernel, just as ELF binary # file /boot/vmlinuz-2.6.32-* /boot/vmlinuz-2.6.32-131.2.1.el6.ppc64: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped /boot/vmlinuz-2.6.32-131.2.1.el6.ppc64.debug: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped /boot/vmlinuz-2.6.32-131.4.1.el6.ppc64: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped /boot/vmlinuz-2.6.32-131.4.1.el6.ppc64.debug: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped /boot/vmlinuz-2.6.32-71.el6.ppc64: ELF 64-bit MSB shared object, 64-bit PowerPC or cisco 7500, version 1 (SYSV), statically linked, stripped
An advisory has been issued which should help the problem described in this bug report. This report is therefore being closed with a resolution of ERRATA. For more information on therefore solution and/or where to find the updated files, please follow the link below. You may reopen this bug report if the solution does not work for you. http://rhn.redhat.com/errata/RHBA-2011-0934.html