Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure creating qcow image on s390x: Support for zipl bootloader config not implemented #1173

Closed
muroj opened this issue Aug 22, 2019 · 11 comments · Fixed by #1264
Closed
Assignees
Labels

Comments

@muroj
Copy link

muroj commented Aug 22, 2019

Problem description

I am new to this space, please bear with me. I am trying to create a SLES12.5 qcow2 image for s390x architecture. I could not locate any s390 examples in kiwi-descriptions, so I am working off the s390 template from the kiwi legacy repo. I've tried a few variations of the <type> element with no success.

Currently, I have the following in config.xml:

<type image="vmx" primary="true" format="qcow2" filesystem="btrfs" bootloader="grub2_s390x_emu" kernelcmdline="TERM=linux console=ttyS0">
  <machine memory="2048" ncpus="2"/>

Running sudo kiwi-ng --type vmx system build --description sles12sp5/ --target-dir /tmp/jmuro/kiwi/ results in:

[ ERROR   ]: 01:14:50 | KiwiCommandError: mv: stderr: mv: cannot stat '/tmp/jmuro/kiwi/build/image-root/boot/initrd.vmx': No such file or directory
mv: cannot stat '/tmp/jmuro/kiwi/build/image-root/boot/linux.vmx': No such file or directory
, stdout: (no output on stdout)

Here is complete log: image-root.log

I also tried changing bootloader to zipl as follows:

<type image="vmx" primary="true" format="qcow2" filesystem="btrfs" bootloader="zipl" kernelcmdline="TERM=linux console=ttyS0">
 <machine memory="2048" ncpus="2"/>

Running sudo kiwi-ng --type vmx system build --description sles12sp5/ --target-dir /tmp/jmuro/kiwi/ results in:

ERROR: 00:48:33 | KiwiBootLoaderConfigSetupError: Support for zipl bootloader config not implemented

I am willing to contribute my example template if I can get it working.

OS and Software information

  • Architecture: s390x
  • KIWI version: KIWI (next generation) version 9.17.15
  • Operating system: SUSE Linux Enterprise Server 15 SP1
  • OBS version: n/a
@schaefi
Copy link
Collaborator

schaefi commented Aug 22, 2019

The s390 target is currently in bad condition which is mostly because of the toolchain inside of the s390 distribution. There are several bugs people are working on but haven't released patches so far. This is the reason why the current s390 build tests are on hold. What you can do is the following:

Check our integration tests from here:

You see they are disabled because of the problems in the distribution. You can simply go and
create a branch project (osc branch) from one of the tests enable it to build the image and you will see the failed build result.

As of now I can only ask for patience because fixes in this direction are outside of kiwi.

@schaefi
Copy link
Collaborator

schaefi commented Aug 22, 2019

[ ERROR ]: 01:14:50 | KiwiCommandError: mv: stderr: mv: cannot stat '/tmp/jmuro/kiwi/build/image-root/boot/initrd.vmx'

This problem has been fixed here: efeb727

@schaefi
Copy link
Collaborator

schaefi commented Aug 22, 2019

ERROR: 00:48:33 | KiwiBootLoaderConfigSetupError: Support for zipl bootloader config not implemented

we currently support zipl in combination with user space grub only. So your first setup was correct

@schaefi
Copy link
Collaborator

schaefi commented Aug 22, 2019

I think the image description from here:

together with the latest kiwi version is a good start. But as I said there are problems in other areas of the s390 distro at the moment.

I will enable our build test so you can see it

@schaefi
Copy link
Collaborator

schaefi commented Aug 22, 2019

So from our build test you see:

EXEC: [bash -c cd /tmp/kiwi_mount_manager.8e5sqsdd && zipl -V -c /tmp/kiwi_mount_manager.8e5sqsdd/config -m menu]
User process fault: interruption code 0009 ilc:2 in zipl[1000000+1c000]

Whatever it means...

@schaefi schaefi self-assigned this Aug 22, 2019
@muroj
Copy link
Author

muroj commented Aug 22, 2019

@schaefi Thanks for your prompt response. I will try the image description you provided. I'm more than happy test s390x specific fixes or provide debug to help move the process along. This tool would be a huge help to my team, as we have to build "base" raw/qcow images relatively frequently. Right now we build these images "manually" using virt-install.

@muroj
Copy link
Author

muroj commented Aug 22, 2019

I built latest kiwi version on my dev system:

sudo .env3/bin/kiwkiwi-ng-3 --version
KIWI (next generation) version 9.18.12`

Updated xml as suggested:

<type image="vmx" primary="true" format="qcow2" filesystem="ext4" bootloader="grub2_s390x_emu" kernelcmdline="TERM=linux console=ttyS0" zipl_targettype="SCSI"/>

It build gets a little further but ultimately fails with:

INFO: 12:27:27 | Installing zipl on disk /dev/loop0
DEBUG: 12:27:27 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.j7ye_93o]
DEBUG: 12:27:27 | EXEC: [mount /dev/mapper/loop0p1 /tmp/kiwi_mount_manager.j7ye_93o]
DEBUG: 12:27:27 | EXEC: [bash -c cd /tmp/kiwi_mount_manager.j7ye_93o && zipl -V -c /tmp/kiwi_mount_manager.j7ye_93o/config -m menu]
DEBUG: 12:27:27 | EXEC: Failed with stderr: (no output on stderr), stdout: (no output on stdout)
ERROR: 12:27:27 | KiwiCommandError: bash: stderr: (no output on stderr), stdout: (no output on stdout)
INFO: 12:27:27 | Cleaning up BootLoaderInstallZipl instance

fwiw, here is the /boot/zipl/config file from an existing (working) qcow:

/boot/zipl # cat config 
## This file was written by 'grub2-install/grub2-zipl-setup'
## filling '/etc/default/zipl2grub.conf.in' as template
## with values from '/etc/default/grub'.
## In-place modifications will eventually go missing!

[defaultboot]
defaultmenu = menu

[grub2]
    target = /boot/zipl
    ramdisk = /boot/zipl/initrd,0x2000000
    image = /boot/zipl/image
    parameters = "root=/dev/disk/by-path/ccw-0.0.0000-part2   TERM=linux console=ttyS0 console=ttyS1 crashkernel=163M initgrub quiet splash=silent plymouth.enable=0 mem=1G "

[skip-grub2]
    target = /boot/zipl
    ramdisk = /boot/zipl/initrd,0x2000000
    image = /boot/zipl/image
    parameters = "root=/dev/disk/by-path/ccw-0.0.0000-part2   TERM=linux console=ttyS0 console=ttyS1 crashkernel=163M "

:menu
    target = /boot/zipl
    timeout = 16
    default = 1
    prompt = 0
    1 = grub2
    2 = skip-grub2

@schaefi
Copy link
Collaborator

schaefi commented Aug 28, 2019

Thanks for the info. The config kiwi creates looks very similar. I suspect the problem is somewhere else. Currently trying to get access to an s390 machine. There is not much I can do without one...

@muroj
Copy link
Author

muroj commented Sep 4, 2019

JFYI: Oregon State University offers a program that allows access to a IBM Z system for build and test of open source projects. Here is the request form.

Here is a link to another open source project (dumb-init) that successfully used the OSU program to create s390x builds.

I'm more than happy to perform any s390x testing as well.

@schaefi schaefi added the P2 label Nov 13, 2019
schaefi added a commit that referenced this issue Nov 14, 2019
The preparation to call zipl and the call itself were wrong.
For whatever reason the kernel image the initrd are moved
to another location prior to calling zipl. That move broke
the system because no kernel/initrd existed at the expected
place anymore. In addition the zipl call itself was issued
from a the wrong directory. Also no config file was written
as an after effect of the refactoring in Issue #1194. This
Fixes #1173 and bsc#1156694
schaefi added a commit that referenced this issue Nov 14, 2019
The preparation to call zipl and the call itself were wrong.
For whatever reason the kernel image the initrd are moved
to another location prior to calling zipl. That move broke
the system because no kernel/initrd existed at the expected
place anymore. In addition the zipl call itself was issued
from a the wrong directory. Also no config file was written
as an after effect of the refactoring in Issue #1194. This
Fixes #1173 and bsc#1156694
@muroj
Copy link
Author

muroj commented Nov 27, 2019

I installed latest version:

zt93kd@jmuro:~/kiwi>kiwi-ng --version
KIWI (next generation) version 9.19.4

The build command fails with the following:

sudo kiwi-ng --debug --type vmx system build --description sles12sp5/ --target-dir /tmp/jmuro/kiwi/
...
[ INFO    ]: 11:16:40 | Installing zipl on disk /dev/loop0
[ DEBUG   ]: 11:16:40 | EXEC: [mountpoint -q /tmp/kiwi_mount_manager.ihht3c2v]
[ DEBUG   ]: 11:16:40 | EXEC: [mount /dev/mapper/loop0p1 /tmp/kiwi_mount_manager.ihht3c2v]
[ DEBUG   ]: 11:16:40 | EXEC: [bash -c cd /tmp/jmuro/kiwi/build/image-root/boot && zipl -V -c zipl/config -m menu]
[ DEBUG   ]: 11:16:40 | EXEC: Failed with stderr: Error: Unable to create temporary device node: No such device or address
, stdout: Using config file 'zipl/config' (from command line)

[ INFO    ]: 11:16:40 | Cleaning up BootLoaderInstallZipl instance

Full debug output: kiwi.build.log

@schaefi
Copy link
Collaborator

schaefi commented Nov 27, 2019

This reads more like an environment problem. Our integration tests works for the target you are aiming for:

I've never seen that error message from zipl to be honest. The call in our integration tests is basically the same and succeeds there. Maybe you are running a different version of zipl on your host, since it's the host zipl that gets called

Regards,
Marcus

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Effectively Done
Development

Successfully merging a pull request may close this issue.

2 participants