storage: restricted probes must gather fs info #1636
Merged
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.
In ubuntu-desktop-installer/issues/1772, a user formatted an existing partition as ext4, which triggered the ESP to be "mounted". Except this mount step also formatted the ESP.
Previously, when we ran block probing, the restricted=False version failed, which caused it to run a restricted=True probe. The restricted=True probe looks at block devices, but does not gather filesystem information. The esp "mount" check is also willing to format the partition if it is unformatted. (We do not have a distinction between a partition that is unformatted and one for which we have not obtained filesystem information.)
This user had block probing restricted=False fail due to LP: #2012722, where Ventoy was in use and we handled the device mapper entry poorly. While recreating the failure case, simply retesting with a build with the fix for LP: #2012722 is enough to avoid this problem. This is because the restricted=False probe passes, which means filesystem info is gathered, which means the mount step doesn't attempt to format it.
There will inevitably be other block probing failure cases for restricted=False. restricted=True must not leave people so vulnerable to a partition reformat.
Gather filesystem information during a restricted=True probe.