-
Notifications
You must be signed in to change notification settings - Fork 17
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
Disable remove extended partition for EFI operation systems #509
base: main
Are you sure you want to change the base?
Disable remove extended partition for EFI operation systems #509
Conversation
adamkankovsky
commented
Nov 12, 2024
•
edited
Loading
edited
So we don't have an assiciation between extended and logical partitions, so we can't do something like this: So, instead of a top-down approach where you're trying to delete the container and the children, if you delete all the children, then the container disappears (in a bottom-up approach). The fact that the extended partition even exists is an artifact of a hack to shoehorn flexibility to allow logical partitions to exist next to primary partitions. Extended partitions don't matter overall; they're implementation details that exist to make logical partitions possible. In other words, if we detect extended partitions (like on an MBR disk, with an empty "type"), we can label them and have a clickable info icon that can explain it, like this: This is a quick mockup, so ignore some of the incorrect details (like missing resizes, having some actions disabled, etc.) What you should notice:
The extended partition is kind of a "ghost" that Anaconda automatically deletes when it's not needed. The text: vda4 is an MBR extended partition that contains logical partitions. Removing all logical partitions will also automatically remove the extended partition. "vda4" should be the partition name, and it should be bold. |
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.
Can you explain in the commit message a bit more clearly why this is needed?
@@ -359,14 +355,16 @@ const DeviceActionDelete = ({ device, hasBeenRemoved, newDeviceSize, onAction }) | |||
|
|||
// Disable the remove action for disk devices without partitions | |||
const isRemoveDisabled = device.type.v === "disk" && device.children.v.length === 0; |
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.
Please integrate the second check here:
const isDiskWithoutChildren = device.type.v === "disk" && device.children.v.length === 0;
const isExtendedPartition = device.attrs?.v.isleaf === "False" && device.children.v.length === 0;
const isRemoveDisabled = isDiskWithoutChildren || isExtendedPartition;
I'd add that in blivet in general extended partitions are treated as implementation detail, something that allows you to create more than 4 partitions on MSDOS partition table. In general we create and remove extended partitions automatically as needed. (It is possible to control this manually and blivet-gui allows that, but Anaconda itself, including manual partitioning does not.) |
42ddf9f
to
59c303f
Compare
59c303f
to
4cddb42
Compare
4cddb42
to
4bc3c5e
Compare