fix(devices): hide internal/system disks from flash targets (#159)#160
Merged
Conversation
Anchor is_system on bus type (Linux/Windows) so internal NVMe/SATA disks (e.g. a second drive mounted at /home) are hidden by default while SD/USB stay selectable and the running OS disk is always protected. Add an opt-in "allow system devices" setting to reveal and flash them at the user's own risk, with a contextual warning row in the confirm summary.
1 task
🧪 Test BuildsVersion:
ℹ️ About these builds
|
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.
Closes #159.
A user with two NVMe drives saw the second one (internal, mounted at /home) offered as a writable target, because only the disk holding /, /boot or /boot/efi was flagged as system.
Detection now keys off the bus type: internal buses (NVMe/SATA/SAS) are hidden by default, SD and USB stay selectable, and the root/boot check still covers boards that boot from the disk being reflashed. Same logic on Windows; macOS already did this. Bus type beats balena's RM/HOTPLUG rule because a hot-plug PCIe NVMe can report HOTPLUG=1.
A new opt-in setting (off by default) unlocks internal/system disks at your own risk, with the real drive icon instead of a lock and a warning row in the confirm screen. Translated across all 18 locales.