-
Notifications
You must be signed in to change notification settings - Fork 290
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
bootloader: Add a zipl bootloader backend #1937
bootloader: Add a zipl bootloader backend #1937
Conversation
(Only compile tested!) |
cd7b553
to
8372e84
Compare
i'd like to test these changes locally as part of creating an fcos/rhcos image on s390x. any idea how i can do that ? |
See https://github.com/coreos/coreos-assembler/blob/master/README-devel.md#using-overrides |
can you share link to this kind of bootloader - zipl ? |
See https://github.com/ibm-s390-tools/s390-tools/ for https://en.wikipedia.org/wiki/Linux_on_z_Systems |
Given we make
I thought "auto" should cover when we specifically set bootloader, but seems not likely as rpm-ostreed reported |
8372e84
to
542f550
Compare
Oh right. Thanks, I merged that bit and added the other bootloaders too for completeness. This bit is ugly...need to rewrite the bootloader stuff, but let's do the easy change for now. |
542f550
to
5646da4
Compare
0900648
to
c60ed2f
Compare
To summarize: Colin @cgwalters, thanks a lot for quick turnaround ! This works perfectly well. I think we are good to go now. |
Looks like there was some permission issue in ostree source tree ? I pulled your remote tree and make a branch on my local repo, maybe that's an issue ? Let me clone your tree then ... |
c60ed2f
to
1b17dc8
Compare
Repushed to retrigger CI. |
zipl is a bit special in that it parses the BLS config files directly *but* we need to run the command to update the "boot block". Hence, we're not generating a separate config file like the other backends. Instead, extend the bootloader interface with a `post_bls_sync` method that is run in the same place we swap the `boot/loader` symlink. We write a "stamp file" in `/boot` that says we need to run this command. The reason we use stamp file is to prevent the case where the system is interrupted after BLS file is updated, but before zipl is triggered, then zipl boot records are not updated. This opens the door to making things eventually-consistent/reconcilable by later adding a systemd unit to run `zipl` if we're interrupted via a systemd unit - I think we should eventually take this approach everywhere rather than requiring `/boot/loader` to be a symlink. Author: Colin Walters <walters@verbum.org> Tested-by: Tuan Hoang <tmhoang@linux.ibm.com> Co-Authored-By: Tuan Hoang <tmhoang@linux.ibm.com>
1b17dc8
to
c61234a
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: cgwalters, jlebon The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/retest |
zipl is a bit special in that it parses the BLS config files
directly but we need to run the command to update the "boot block".
Hence, we're not generating a separate config file like the other
backends. Instead, extend the bootloader interface with a
post_bls_sync
method that is run in the same place we swap the
boot/loader
symlink.We write a "stamp file" in
/boot
that says we need to run this command.The reason we use stamp file is to prevent the case where the system is
interrupted after BLS file is updated, but before zipl is triggered,
then zipl boot records are not updated.
This opens the door to making things eventually-consistent/reconcilable
by later adding a systemd unit to run
zipl
if we're interrupted viaa systemd unit - I think we should eventually take this approach
everywhere rather than requiring
/boot/loader
to be a symlink.Author: Colin Walters walters@verbum.org
Tested-by: Tuan Hoang tmhoang@linux.ibm.com
Co-Authored-By: Tuan Hoang tmhoang@linux.ibm.com