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

Add support for ESP partition flag #2133

Merged
merged 1 commit into from
Sep 29, 2023
Merged

Conversation

codefiles
Copy link
Contributor

Fixes #2131

@codefiles codefiles requested a review from Torxed as a code owner September 29, 2023 13:49
@Torxed
Copy link
Member

Torxed commented Sep 29, 2023

That issue was bigger than I thought, but great fix.
Are we confident enough to push a quick release with this one? If so, I'll do that right away to ensure it gets into the ISO.

Awesome work, and I don't mean to stress you but if we feel good about it I'd be happy to work on a release asap :)

@Torxed Torxed merged commit 9f5c2bb into archlinux:master Sep 29, 2023
6 checks passed
@codefiles
Copy link
Contributor Author

codefiles commented Sep 29, 2023

That issue was bigger than I thought, but great fix.

I thought that I should add support for the ESP partition flag to fix this when I looked over the logic. I ended up deciding on not making PartitionModification.is_efi() hard require the ESP partition flag in detection because then it would be needed in the configuration file when used with --silent or it would fail to get the ESP. Instead I made it depend on if either the boot flag or ESP flag are present. This can be changed to check for just the boot flag since it will be present when the ESP flag is. I am now wondering if there was value in adding the changes to partitioning_menu.py and disk_conf.py

The fix for the issue you were having is the mount point check that I added to DeviceModification.get_efi_partition(). You had more than one partition that matched the filter in get_efi_partition() and only the first one, which did not have a mount point, gets returned.

Are we confident enough to push a quick release with this one?

I would have confidence in it if you could confirm you tested it again and it does not fail with the configuration you were trying.

@codefiles codefiles deleted the add-esp-flag branch September 29, 2023 14:40
@Torxed
Copy link
Member

Torxed commented Sep 29, 2023

I would have confidence in it if you could confirm you tested it again and it does not fail with the configuration you were trying.

Tested and it works like a charm!

@codefiles
Copy link
Contributor Author

I want to revert the changes to partitioning_menu.py and disk_conf.py. I believe those changes were a mistake because the esp flag is an alias to the boot flag on GPT per parted documentation. That code would then not be needed since the boot flag was being set before this change and still is after it. This would also mean that PartitionModification._efi_indicator_flags can be removed and then the first check of PartitionModification.is_efi() can use the following change:

-any(set(self.flags) & set(self._efi_indicator_flags))
+PartitionFlag.Boot in self.flags

Considering this, the title used here is incorrect since the changes are to fix detecting the correct ESP as I mentioned in my last comment.

If you agree with this then I can submit a pull request for it immediately.

@codefiles
Copy link
Contributor Author

I now see that you made a release just before my comment was submitted. Oh well, I guess it does not matter anyway.

@Torxed
Copy link
Member

Torxed commented Sep 30, 2023

I missed it by a minute, is it a huge concern? If so I can revert it, because I haven't published to the Arch mirrors yet - so technically this release is not fully out there yet :)
Just a matter of deleting the tag and re-submitting it at this point.

@codefiles
Copy link
Contributor Author

Not a huge concern.

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.

--efi-dir=None instead of being omitted
2 participants