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

restore.py/restoreFromBackup(): Ensure esp mount point is known before setting EFI boot entries #161

Merged
merged 1 commit into from
Oct 4, 2024

Conversation

GeraldEV
Copy link
Collaborator

@GeraldEV GeraldEV commented Jul 26, 2024

setEfiBootEntry called here: https://github.com/xenserver/host-installer/blob/master/restore.py#L134
Which requires mounts['esp']: https://github.com/xenserver/host-installer/blob/master/backend.py#L1136

Manually tested this fixes the regression

INFO     [2024-07-26 13:23:01] Traceback (most recent call last):
  File "/opt/xensource/installer/install.py", line 256, in go
    restore.restoreFromBackup(backup, progress)
  File "/opt/xensource/installer/restore.py", line 143, in restoreFromBackup
    backend.setEfiBootEntry(mounts, disk, boot_partnum, constants.INSTALL_TYPE_RESTORE, branding)
  File "/opt/xensource/installer/backend.py", line 1142, in setEfiBootEntry
    if os.path.exists(os.path.join(mounts['esp'], 'EFI/xenserver/shimx64.efi')):
                                   ~~~~~~^^^^^^^
KeyError: 'esp'

@ydirson
Copy link
Contributor

ydirson commented Aug 5, 2024

This seems to address the same problem as #151

Copy link
Collaborator

@bernhardkaindl bernhardkaindl left a comment

Choose a reason for hiding this comment

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

I checked again: It's a clear fix and the right thing to do from my understanding.

@freddy77: @GeraldEV wrote in #165 that the Ext4 rootfs PR depends on this PR.

Can you (or @ashwin9390) review it? Thanks!

@bernhardkaindl bernhardkaindl changed the title Ensure esp mount point is known before setting EFI boot entries restore.py/restoreFromBackup(): Ensure esp mount point is known before setting EFI boot entries Oct 4, 2024
@bernhardkaindl bernhardkaindl linked an issue Oct 4, 2024 that may be closed by this pull request
@GeraldEV GeraldEV merged commit 5e10dc7 into master Oct 4, 2024
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.

[xs8] "restore" with UEFI is broken
4 participants