Skip to content

Partition Management & Operations

fparted provides full-lifecycle partition management with preflight geometry validation to prevent sector overlapping and misalignment.


🛠️ Operations Overview

graph LR
    A[Unallocated Space] -->|New Partition Dialog| B[Create Partition]
    B -->|Format / Label| C[Active Partition]
    C -->|Edit Dialog| D[Change Name / Flags / UUID]
    C -->|Resize / Move| E[Adjust Boundaries]
    C -->|Delete Action| F[Delete Partition]
    F --> A

1. Creating a Partition (mkpart)

When creating a partition: - Partition Type: primary or logical (for MBR tables with an extended partition). - Filesystem Format: ext4, ext3, ext2, FAT32, FAT16, exFAT, Btrfs, F2FS, Swap, LVM, or unformatted. - Sector Alignment: Default 1 MiB boundary alignment to ensure optimal flash storage and SSD write performance. - Label & GPT Name: Optional volume label and GPT partition name.


2. Partition Flags & Attributes

Supported partition flags on GPT and MBR tables:

Flag Name Typical Use Case
boot Legacy BIOS active/bootable partition
esp EFI System Partition (FAT32)
lvm Linux Logical Volume Manager physical volume
raid Linux software RAID array component
swap Dedicated Linux swap partition
hidden Hides partition from legacy OS auto-mounting
diag OEM / Recovery diagnostics partition

3. UUID Regeneration

Allows generating a fresh random filesystem UUID to eliminate duplicate-UUID collisions after cloning a partition: - ext2/ext3/ext4: tune2fs -U random <dev> - Btrfs: btrfstune -u <dev> - Swap: mkswap -U random <dev>


4. Deleting a Partition

  • Validates that the partition is unmounted and not in use by any swap or mapper device.
  • Emits a DeletePartitionOperation executing parted -s <disk> rm <num>.