RFC: fix to detect mounted LUKS-encrypted btrfs subvolumes #2198
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.
PR Description:
This is a prototype fix for detecting already-mounted btrfs volumes, when inside of a LUKS encrypted partition. Without this fix, the code only detects the LUKS partition and not its mounted counterpart.
This code adds the detection for this case, and then recurses down to the children to find the btrfs subvolumes. The reason this is a prototype (request for comment) is that I don't know what to do about the
partition
information. The subvolume is technically part of the LUKS partition, but e.g. the path is /dev/mapper/ not /dev/sda1 (which points to LUKS). etc.This PR does seem? to work when running archinstall on my own setup, but I don't have enough knowledge of the codebase to understand what the correct solution is.
I'm happy to carry this PR forward, with guidance. Otherwise I'm happy to turn it over to @Torxed or others to implement a more robust solution
Tests and Checks