-
Notifications
You must be signed in to change notification settings - Fork 48
Refactor: Improve Boot Exclusion in diskutils.go for EMT ISO Installer #429
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
Refactor: Improve Boot Exclusion in diskutils.go for EMT ISO Installer #429
Conversation
cb901b3 to
ee2dcc2
Compare
a428ca7 to
0208beb
Compare
yepmunchun
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we just need to exclude the device that currently acting as the installer, isn't that the isBootDevice check is sufficient? Why do we still need isISODevice and isReadOnlyISO check?
Thanks for the review! isBootDevice catches the active installer device via /proc/cmdline and /proc/mounts, but isISODevice and isReadOnlyISO are needed to exclude non-boot ISO9660 devices (e.g., a secondary USB) that could be installer media. isISODevice flags ISO filesystems with blkid, and isReadOnlyISO confirms read-only status to avoid writable disks. This ensures safety in multi-device setups |
|
I think the original issue is to prevent the currently active installer from being selected as the installation target. |
- Refactored SystemBlockDevices to build the device list incrementally instead of pre-allocating with fixed size. - Added isBootDevice to detect and exclude active boot devices using /proc/cmdline and /proc/mounts. This improves safety for EMT ISO installer by preventing accidental selection of boot or ISO devices as installation targets. Signed-off-by: kinatli jayanth <[email protected]>
0208beb to
834b8de
Compare
- Refactored SystemBlockDevices to build the device list incrementally instead of pre-allocating with fixed size. - Added isBootDevice to detect and exclude active boot devices using /proc/cmdline and /proc/mounts. This improves safety for EMT ISO installer by preventing accidental selection of boot or ISO devices as installation targets. Signed-off-by: kinatli jayanth <[email protected]>
834b8de to
89eb2a8
Compare
Addressed |
…com/Jkintalix/edge-microvisor-toolkits into feature/filter-system-block-devices
- Refactored SystemBlockDevices to build the device list incrementally instead of pre-allocating with fixed size. - Added isBootDevice to detect and exclude active boot devices using /proc/cmdline and /proc/mounts. This improves safety for EMT ISO installer by preventing accidental selection of boot or ISO devices as installation targets. Signed-off-by: kinatli jayanth <[email protected]>
89eb2a8 to
6c26d0e
Compare
2879667 to
00bdeb4
Compare
…com/Jkintalix/edge-microvisor-toolkits into feature/filter-system-block-devices Signed-off-by: kinatli jayanth <[email protected]>
00bdeb4 to
334ba14
Compare
2893cd0 to
40bf349
Compare
Signed-off-by: kinatli jayanth <[email protected]>
40bf349 to
cd7772d
Compare
Merge Checklist
All boxes should be checked before merging the PR
Description
For reference to ITEP-70891: This change refactors SystemBlockDevices to exclude boot and ISO devices from the returned list of installation targets. Previously, all block devices were included, which risked accidentally selecting the root disk or mounted ISO images during installation. The update introduces new helper functions: isReadOnlyISO to filter devices mounted as read-only. With these improvements, the EMT ISO installer now only considers safe, valid disks for installation, reducing the risk of overwriting the boot disk or ISO media
The EMT ISO installer was incorrectly listing the system’s boot device and mounted ISO devices as valid installation targets. This created a risk of overwriting the active root disk or the installation media itself, leading to failed or unstable installations. The filtering logic for excluding boot/ISO devices already exists in the graphical installer, and this update brings the same robustness to the EMT ISO installer.
Any Newly Introduced Dependencies
No
How Has This Been Tested?
Tested ISO locally.
Terminal disk selection page: