Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1478448
Summary: | [RFE] Build RHEL .iso images with El-Torito boot information on s390x | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 7 | Reporter: | Thomas Huth <thuth> | ||||
Component: | lorax | Assignee: | Brian Lane <bcl> | ||||
Status: | CLOSED ERRATA | QA Contact: | Release Test Team <release-test-team> | ||||
Severity: | medium | Docs Contact: | Yehuda Zimmerman <yzimmerm> | ||||
Priority: | medium | ||||||
Version: | 7.5 | CC: | areis, bcl, bugproxy, dmach, hannsj_uhl, herrold, jstodola, mtessun, pholica, salmy, thuth | ||||
Target Milestone: | rc | Keywords: | FutureFeature | ||||
Target Release: | 7.5 | ||||||
Hardware: | s390x | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | lorax-19.6.97-1 | Doc Type: | Enhancement | ||||
Doc Text: |
The Red Hat Enterprise Linux 7 ISO image can be used to create guests virtual machines on IBM z Systems
With this release, you can create a bootable Red Hat Enterprise Linux ISO file for _KVM_ virtual machines on the IBM z Systems architecture. As a result, Red Hat Enterprise Linux guest virtual machines on IBM z Systems can boot from a `boot.iso` file.
|
Story Points: | --- | ||||
Clone Of: | |||||||
: | 1523487 (view as bug list) | Environment: | |||||
Last Closed: | 2018-04-10 17:39:42 UTC | Type: | Bug | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | 1523487 | ||||||
Bug Blocks: | 1576733 | ||||||
Attachments: |
|
Description
Thomas Huth
2017-08-04 14:52:58 UTC
FWIW, I was able to manually create a bootable ISO image from an existing RHEL ISO image with these steps: 1. Get a tool that can glue an initrd to kernel for s390x, for example: wget https://raw.githubusercontent.com/rhinstaller/anaconda/rhel6-branch/utils/mk-s390-cdboot.c gcc mk-s390-cdboot.c -o mk-s390-cdboot 2. Loop-mount the existing RHEL ISO image: mount -o loop RHEL-7.4-20170711.0-Server-s390x-dvd1.iso /mnt 3. Create a (writable) folder with the new CD contents: mkdir cd cp -r /mnt/* cd/ 4. Create a combined kernel+initrd file in that folder: echo ro > parm.txt ./mk-s390-cdboot -i /mnt/images/kernel.img -r /mnt/images/initrd.img \ -p parm.txt -o cd/images/bigkernel.img 5. Create the new ISO image with the El-Torito settings: genisoimage -r -l -no-emul-boot -eltorito-boot images/bigkernel.img \ -o rhel-test.iso cd/ Thanks for the details! Did you run mk-s390-cdboot on a s390 or on x86 and copy it over? I ran it on a s390x machine. I haven't tried whether that tool also correctly runs on a x86 box. (In reply to Thomas Huth from comment #4) > I ran it on a s390x machine. I haven't tried whether that tool also > correctly runs on a x86 box. It probably doesn't, there's nothing there to handle the byte order differences. I'll rewrite it in python and make sure it can run everywhere. Created attachment 1311325 [details]
mk-s390-cdboot utility
When you have a chance could you give this a try and make sure it works.
Here's a patch to lorax that *may* work, it hasn't been tested on s390 yet. https://github.com/rhinstaller/lorax/pull/236 (In reply to Brian Lane from comment #6) > When you have a chance could you give this a try and make sure it works. I'm sorry, but it does not work yet. I've debugged it, and it seems like it overwrites some required code at offset 0x11000 of the kernel image. Looks like the maximum length of the kernel parameters is less than 4096 here. It works fine if I use this value instead: KERNEL_CMDLINE_SIZE = 0xb80 I think that should be the correct value here. Looking at the end of https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/s390/kernel/head.S you can see that the kernel command line starts at offset 0x10480 and ends at 0x11000. (In reply to Thomas Huth from comment #8) > (In reply to Brian Lane from comment #6) > > When you have a chance could you give this a try and make sure it works. > > I'm sorry, but it does not work yet. I've debugged it, and it seems like it > overwrites some required code at offset 0x11000 of the kernel image. Looks > like the maximum length of the kernel parameters is less than 4096 here. It > works fine if I use this value instead: > > KERNEL_CMDLINE_SIZE = 0xb80 > > I think that should be the correct value here. Looking at the end of > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/ > s390/kernel/head.S you can see that the kernel command line starts at offset > 0x10480 and ends at 0x11000. Thanks! It's interesting that doesn't match either of the values at https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/s390/include/uapi/asm/setup.h I'm going to go with 896 just to be safe, really it just needs to be long enough to overwrite the default included in the kernel. Thanks for the new build. Using that, I was finally able to run lorax to a point where I got a boot.iso image. However, it still did not boot in my s390x guest yet. After doing quite a bit of debugging, I finally discovered that the beginning of the joint kernel image got destroyed and so some magic bytes are missing there and the firmware refuses to load the image. The problem is the "-boot-info-table" parameter that you use for mkisofs: It rewrites some bytes at the beginning of the kernel image - but this is not needed for s390x. Could you please simply remove that parameter from the template? (In reply to Thomas Huth from comment #12) > The problem is the "-boot-info-table" parameter that you use for mkisofs: It > rewrites some bytes at the beginning of the kernel image - but this is not > needed for s390x. Could you please simply remove that parameter from the > template? Thanks for debugging this! Have you tried removing it yourself and confirmed that the boot.iso really boots? Yes, after removing "-boot-info-table" from /usr/share/lorax/s390.tmpl and running lorax again, the boot.iso file is finally bootable. So this seems to be the last missing piece to get it working! Thanks, I've checked with lorax-19.6.97-1 that the resulting boot.iso now boots fine in my KVM guest on s390x! Moving back to ASSIGNED based on previous comment, dvd iso image is not set as bootable. The s390 boot.iso doesn't have the El Torito boot table, so running dumpet on it isn't expected to work. As indicated by comment 12 adding the table scrambles the s390 image and causes it not to boot. According to comment 15 they actually do work. (In reply to Jan Stodola from comment #23) > Thomas, > could you please give it a try and confirm that you can boot both dvd.iso > and boot.iso images from RHEL-7.5 Alpha compose? Now this is weird. It works with the boot.iso image: $ /usr/libexec/qemu-kvm -nographic -m 768 -device virtio-scsi -drive file=RHEL-7.5-20171130.0-Server-s390x-boot.iso,format=raw,if=none,id=c1 -device scsi-cd,drive=c1 -hda /tmp/guest.qcow2 LOADPARM=[........] Using virtio-scsi. SCSI CD-ROM detected. ISO boot image size verified [ 0.084036] Initializing cgroup subsys cpuset [ 0.084039] Initializing cgroup subsys cpu [ 0.084041] Initializing cgroup subsys cpuacct [ 0.084045] Linux version 3.10.0-799.el7.s390x (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-25) (GCC) ) #1 SMP Mon Nov 27 07:06:08 EST 2017 [ 0.084051] setup: Linux is running under KVM in 64-bit mode ... etc. ... But it seems like it does not work with the dvd.iso yet: $ /usr/libexec/qemu-kvm -nographic -m 768 -device virtio-scsi -drive file=RHEL-7.5-20171130.0-Server-s390x-dvd1.iso,format=raw,if=none,id=c1 -device scsi-cd,drive=c1 -hda /tmp/guest.qcow2 LOADPARM=[........] Using virtio-scsi. SCSI CD-ROM detected. ! Cannot IPL this ISO image ! Brian, any idea what might be wrong here? (In reply to Thomas Huth from comment #24) > (In reply to Jan Stodola from comment #23) > > Thomas, > > could you please give it a try and confirm that you can boot both dvd.iso > > and boot.iso images from RHEL-7.5 Alpha compose? > > Now this is weird. It works with the boot.iso image: > > $ /usr/libexec/qemu-kvm -nographic -m 768 -device virtio-scsi -drive > file=RHEL-7.5-20171130.0-Server-s390x-boot.iso,format=raw,if=none,id=c1 > -device scsi-cd,drive=c1 -hda /tmp/guest.qcow2 > LOADPARM=[........] > Using virtio-scsi. > SCSI CD-ROM detected. > ISO boot image size verified > [ 0.084036] Initializing cgroup subsys cpuset > [ 0.084039] Initializing cgroup subsys cpu > [ 0.084041] Initializing cgroup subsys cpuacct > [ 0.084045] Linux version 3.10.0-799.el7.s390x > (mockbuild.eng.bos.redhat.com) (gcc version 4.8.5 20150623 > (Red Hat 4.8.5-25) (GCC) ) #1 SMP Mon Nov 27 07:06:08 EST 2017 > [ 0.084051] setup: Linux is running under KVM in 64-bit mode > ... etc. ... > > But it seems like it does not work with the dvd.iso yet: > > $ /usr/libexec/qemu-kvm -nographic -m 768 -device virtio-scsi -drive > file=RHEL-7.5-20171130.0-Server-s390x-dvd1.iso,format=raw,if=none,id=c1 > -device scsi-cd,drive=c1 -hda /tmp/guest.qcow2 > LOADPARM=[........] > Using virtio-scsi. > SCSI CD-ROM detected. > ! Cannot IPL this ISO image ! > > Brian, any idea what might be wrong here? I think the dvd.iso is created using a different final process. IIRC they use lorax to make the tree, then add packages and run their own mkisofs on it, so that may need to be changed. I'm not sure who is in charge of that these days (used to be dmach) but Jan should know. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2018:0947 |