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

s390x: ensure chreipl is called before unmounting /target #1799

Merged
merged 1 commit into from
Sep 20, 2023

Conversation

ogayot
Copy link
Member

@ogayot ogayot commented Sep 19, 2023

For ZFS, we recently introduced a call to umount --recursive /target slighly before shutting down or rebooting. Unfortunately, on s390x, we also had a very late call to chreipl to make the firmware boot from the installed system.

The call to chreipl reads data from /target/boot, and it fails if the filesystem is no longer mounted.

Fixed by calling chreipl earlier in the installation, during the postinst phase rather than after the user clicks "reboot".

LP: #2029479

For ZFS, we recently introduced a call to $(umount --recursive /target)
slighly before shutting down or rebooting. Unfortunately, on s390x, we
also had a very late call to chreipl to make the firmware boot from the
installed system.

The call to chreipl reads data from /target/boot, and it fails if the
filesystem is no longer mounted.

Fixed by calling chreipl earlier in the installation, during the
postinst phase rather than after the user clicks "reboot".

Signed-off-by: Olivier Gayot <olivier.gayot@canonical.com>
Copy link
Collaborator

@dbungert dbungert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice work.

@ogayot
Copy link
Member Author

ogayot commented Sep 19, 2023

Tested on z/VM, After reboot, the system booted the newly installed system.

Furthermore, the logs on the target system show the successful call to chreipl.

2023-09-19 15:35:51,905 DEBUG subiquitycore.utils:118 arun_command called: ['chreipl', '/target/boot']
2023-09-19 15:35:51,907 DEBUG subiquitycore.utils:132 arun_command ['chreipl', '/target/boot'] exited with code 0
2023-09-19 15:35:51,907 INFO root:30 finish: subiquity/Install/install/postinstall: SUCCESS: final system configuration
2023-09-19 15:35:51,908 DEBUG root:30 finish: subiquity/Install/install: SUCCESS: 

@@ -666,6 +667,17 @@ async def install(self, *, context):
)
raise

async def platform_postinstall(self):
"""Run architecture specific commands/quirks"""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

genuine question do we want to use a context here to inform the user this is happening?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that would be a good idea. At least for platforms that don't just noop.

@dbungert
Copy link
Collaborator

Merging - Olivier, please consider the context change for a follow-on.

@dbungert dbungert merged commit 21e6b1e into canonical:main Sep 20, 2023
@ogayot ogayot deleted the chreipl-earlier branch September 21, 2023 08:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants