Add s390x iso boot support - #3045
Conversation
Add a test case to cover the instantiation of the newly added s390x_iso bootloader configuration class.
Allow the newly added 's390x_iso' bootloader configuration to be preserved during live image building, rather than overwriting it with 'grub2'.
|
Hi, thanks much for working on this topic 👍 Here are my thoughts
I do not understand why this is needed. If you build a live image (builder/live) or an install image (builder/install) and the architecture is s390, this should be enough information to target BootLoaderS390xIso
This is correct. We usually solve this by creating the config parts that do not require direct access to the initrd first and for those parts that require it an extra method is added to the bootloader class and called in the builder at a time where all data required exists. An example can be looked up for "_create_embedded_fat_efi_image" method where we have the same problem. And you solved this by a setup_s390x_boot_images method. If you like to stick with this concept please make it a private method e.g.
yes and I have no objections if you add such a method to the bootloader/config/base.py base class and call it in the builders. If not implemented it should be a noop. I agree it would also be the better concept for the existing not so nice implementation of e.g. _create_embedded_fat_efi_image. Maybe all this as a refactoring PR after this one completed ?
suse_ins_content, media_suse_ins_content, etc ... These are all suse specific settings and I think only because of the texts and not because of the offsets or files. So to for upstream to accept this, it needs to be changed into a generic solution. This is typically set by the This can be also a generic information without distro tag, but could also take the |
s390x_isoThat's indeed a dark area but I see no way around it. There is for example this code (and also in install.py) (which is wrong, imho): It knows only about grub2 and systemd-boot. This prevents you to have any other bootloader, even 'custom' does not work. s390x iso setup is not grub2 and it makes no sense to inject the code somewhere in the grub2 path as there is also validly a s390x grub2 setup. So imho it's better to have a separate class for it. |
SUSE brandingIndeed, this needs to be generalized. It's not only strings in files but also file names like suse.ins. These should probably not be created at all but be entirely user-provided. |
I did not question the class, that's all fine. I'm questioning the selection method. You implemented a class and something similar in builder/install. So from my perspective no changes to the kiwi schema are required The bootloader section is an optional one and I think you don't need it for s390 live iso's or are there other attributes that we need to set here ? If we need more from Thoughts ? |
|
@wfeldt regarding the bootloader attribute I'm fine if you think we need one. In case we need one can you change the name such that it follows the naming layout better ? (not starting with the arch name) e.g. "iso_s390x" as we also have "grub2_s390x_emu" Thanks |
|
So, essentially you want the bootloader decision to happen here: This is exactly the point I don't understand. As the code currently is, it prevents you from having bootloader = custom, for example. Even though you can set this in the kiwi file. Is that intentional? Also, should there be a way to have no bootloader configured? Seems you cannot do this atm. My expectation was that these two lines should not be there at all and you always get the bootloader as specified in the kiwi file. But maybe that is not what kiwi users expect... |
you can, just do not provide a
point is not what I want. My point is: Is a by user selection of a bootloader required in this condition (building an ISO image for s390) yes or no ? meaning is there any choice to made ? and do you expect other attributes of the Thoughts ? |
|
Maybe I'm missing the point, but do you mean |
Let's make an example. To define a live ISO setup a type definition can look like this (x86_64 example) <type image="iso">
<bootloader name="grub2" console="serial" timeout="10"/>
</type>To do the same for s390x, my question is, do we need any information from a <type image="iso"/>If you say this is not true and we need further information as part of a bootloader section you are right and we also need a name for that and the respective schema adaptions. Does it make more sense now ? |
|
If |
That would be |
|
and to be more precise if you don't specify any |
|
If the only selection for <type image="iso">
<bootloader name="iso_s390x"/>
</type>then this is imho a pointless information. However, if we need more from this bootloader, timeout, console, etc etc then it is of course needed |
|
and if it is needed there might be a followup issue because in a disk type build for s390x it looks like this <type image="oem" filesystem="xfs" bootpartition="false" kernelcmdline="console=ttyS0" format="qcow2">
<bootloader name="grub2_s390x_emu" console="serial" timeout="10"/>
</type>as you can see the loader is our suse zipl2grub thing and assuming you want an install ISO from this disk as well you would add which then kicks the ISO building procedure of |
Task
This pr adds boot support for s390x Live ISOs.
s390x_isobootloader typebootloader/config/s390x_iso.pyclassboot/s390x/loader/Issues
bootloader/config/are called before the initrd is created; this makes it tricky to create config files that rely on an existing initrd_create_embedded_fat_efi_imagemethod increate_live_iso_boot_imagessetup_s390x_boot_imagesmethod used in the same wayTodo
No real unit tests yet.
AI disclaimer
This code was created with the assistence of Gemini.