toolkit: fix encrypted ISO installer hang - #18795
Open
Muhammad Falak R Wani (mfrw) wants to merge 1 commit into
Open
toolkit: fix encrypted ISO installer hang#18795Muhammad Falak R Wani (mfrw) wants to merge 1 commit into
Muhammad Falak R Wani (mfrw) wants to merge 1 commit into
Conversation
Use WaitForDiskDevice instead of RefreshPartitions after partition setup. sfdisk already updates the kernel partition table, while the opened LUKS/LVM mapping keeps the root partition busy and causes a subsequent BLKRRPART request to return EBUSY. Also increment the partition-reread retry counter instead of resetting it to 1, restoring the retry limit and preventing indefinite backoff. Keep the metadata synchronization checks without rereading an in-use partition table. Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
Muhammad Falak R Wani (mfrw)
marked this pull request as ready for review
September 11, 2026 13:58
Muhammad Falak R Wani (mfrw)
requested a review
from a team
as a code owner
September 11, 2026 13:58
Copilot started reviewing on behalf of
Muhammad Falak R Wani (mfrw)
September 11, 2026 14:10
View session
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The functional changes are sound; only a minor comment typo remains.
Pull request overview
Prevents encrypted ISO installer hangs during partition setup.
Changes:
- Waits for disk metadata without triggering
BLKRRPART. - Restores the partition-reread retry limit.
File summaries
| File | Description |
|---|---|
toolkit/tools/imagegen/diskutils/diskutils.go |
Updates partition synchronization and retry behavior. |
Review details
- Files reviewed: 1/1 changed files
- Comments generated: 1
- Review effort level: Balanced
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| // Wait for the disk's metadata to populate. | ||
| err = RefreshPartitions(diskDevPath) | ||
| // sfdisk already updated the partition table. LUKS/LVM may now hold | ||
| // partions open, so wait for metadata without issuing BLKRRPART |
Daniel McIlvaney (dmcilvaney)
approved these changes
Sep 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Use WaitForDiskDevice instead of RefreshPartitions after partition
setup. sfdisk already updates the kernel partition table, while the
opened LUKS/LVM mapping keeps the root partition busy and causes a
subsequent BLKRRPART request to return EBUSY.
Also increment the partition-reread retry counter instead of resetting
it to 1, restoring the retry limit and preventing indefinite backoff.
Keep the metadata synchronization checks without rereading an in-use
partition table.
Signed-off-by: Muhammad Falak R Wani falakreyaz@gmail.com