Closed stefan-haberland closed 3 years ago
zipl uses the BLS snippet title field to create a new menu entry, when in BLS snippet the initrd field is before title, zipl wrongly assumes that initramfs is for the only section it has defined (defaultboot). if title before initrd and linux, it should work, since by the time it parses the initrd and linux, it would already created a new section for 'Fedora 29 (CoreOS preview) 29 (ostree)'.
BLS file:
initrd /ostree/fedora-coreos-c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/initramfs-5.0.9-200.fc29.s390x.img title Fedora 29 (CoreOS preview) 29 (ostree)options ostree=/ostree/boot.1/fedora-coreos/c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/0 ignition.firstboot linux /ostree/fedora-coreos-c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/vmlinuz-5.0.9-200.fc29.s390xversion 1
there are some paste error whatever the correctly worked one is : title Fedora 29 (CoreOS preview) 29 (ostree) version 1 initrd /ostree/fedora-coreos-c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/initramfs-5.0.9-200.fc29.s390x.img options ostree=/ostree/boot.1/fedora-coreos/c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/0 ignition.firstboot linux /ostree/fedora-coreos-c2182f8fe3ba1f8ffe5dbc9ee89503637e06a7e1d7a0e12b50d4d0d4665c063e/vmlinuz-5.0.9-200.fc29.s390x
We could pretty easily change ostree for this if it helps; what exactly is zipl expecting here? title, linux, options, initrd in that order?
We could pretty easily change ostree for this if it helps; what exactly is zipl expecting here? title, linux, options, initrd in that order?
@cgwalters I think the only constraint is that the title must be the first field. Since as @zhengxiaomei123 mentioned, zipl uses the title field to add a new IPL section that will be the one associated with the other fields in the BLS snippet.
@cgwalters @martinezjavier : and also no blank line in loader entries file or else zipl will complain.
But I think it's zipl's business to peacefully discard blank lines and accept any order of loader entries file.
Just realized blank line issue seems to be fixed in https://github.com/ibm-s390-tools/s390-tools/commit/53f166673d0a338822362f500da4fa33df6c3296
but not backported to F29/F30 yet.
It seems that the scan code makes an implicit assumption that title is always on the top. I would add an early explicit check for this (to make sure that the title is on the top). If the check is failed, then return an error with a message that "title is not on the top", which is a hint for user to edit BLS file properly.
There is no real need to have the title field in the first position, also the BLS documentation does not say this. So I would prefer to have the scanner sort the fields properly.
"Title" is something which is always on the top - I don't think that it needs to be documented . So, I would first start from identifying a real need for having it not on the top (just because it will add a complexity to the implementation).
following error occurs when the title entry is not the first line in a BLS file:
Error: Config file '/root/zipl.conf': Line 0: keyword 'image' not allowed in section 'defaultboot'
zipl.conf:
BLS file: