Managing Partitions & Tables 🗂️¶
This guide walks you through everything you need to know about working with disk partition tables, adding partitions, resizing, moving, and managing partition flags in fparted.
1. Initializing a Partition Table¶
Before a blank flash drive, MicroSD card, or loop disk can hold files, it must have a partition table (also called a disklabel).
┌────────────────────────────────────────────────────────────────────────┐
│ Create Partition Table: /dev/block/mmcblk1 (128 GiB) │
│ │
│ Partition Table Type: │
│ ◉ GPT (GUID Partition Table) — Modern, recommended for all devices │
│ ○ MS-DOS (MBR) — Legacy format, max 2 TB, max 4 primary │
│ ○ Advanced (BSD, Sun, Mac APM, AIX, Amiga, DVH, PC-98) │
│ │
│ ⚠️ WARNING: This will erase all existing partition records on disk. │
│ [ Cancel ] [ Create Table ]│
└────────────────────────────────────────────────────────────────────────┘
Step-by-Step¶
- Select your target disk from the left navigation rail.
- Tap the Create Partition Table button (or press Ctrl + Shift + T).
- Select your desired partition table standard:
- GPT (GUID Partition Table): Modern standard. Supports 128+ partitions, drives larger than 2 TiB, 64-bit sector addressing, unique UUIDs per partition, and UTF-16 partition names. Recommended for almost all setups.
- MS-DOS (MBR): Legacy standard. Limited to 4 primary partitions (or 3 primary + 1 extended) and 2 TiB total addressable capacity. Use this only for legacy BIOS boot compatibility or ancient MP3 players.
- Specialized Types:
fpartedalso supports initializing BSD disklabel, Mac Apple Partition Map (APM), Sun, AIX, Amiga RDB, DVH, and PC-98 partition tables. - Tap Create Table. The operation is staged in your Operations Queue at the bottom of the screen.
2. Creating a New Partition¶
To carve out a new partition from an unallocated free space block:
┌────────────────────────────────────────────────────────────────────────┐
│ New Partition: /dev/block/mmcblk1p2 │
│ │
│ Filesystem: [ ext4 ▼ ] Partition Type: [ Primary ▼ ] │
│ │
│ Size: [ 32768 ] MiB Free Space Following: [ 31232 ] MiB │
│ ├───────────────────────────────●──────────────────────────────────┤ │
│ │
│ Filesystem Label: [ TermuxRootfs ] (Optional) │
│ Partition Name: [ linux_root ] (GPT only) │
│ Sector Alignment: ◉ Align to 1 MiB (2048 sectors) │
│ [ Cancel ] [ Add ] │
└────────────────────────────────────────────────────────────────────────┘
Step-by-Step¶
- Tap an Unallocated block in the visual partition graph or select it in the partition table list.
- Tap New Partition (or press Ctrl + N).
- Configure your partition details:
- Filesystem: Choose the filesystem to format immediately (
ext4,FAT32,exFAT,Btrfs,F2FS,NTFS,Linux Swap, orunformatted). - Size: Drag the interactive slider or enter the exact size in MiB.
- Label: Give the filesystem a recognizable volume label (e.g.,
Music,Backup,Rootfs). - Partition Name (GPT only): Set a low-level GPT partition name (e.g.,
system,vendor,userdata). - Alignment: By default,
fpartedaligns all partition boundaries to 1 MiB (2048 sectors). - Tap Add to stage the creation into the operations queue.
[!TIP] Why is 1 MiB Sector Alignment Important?
Modern flash memory (MicroSD cards, UFS chips, and SSDs) use internal 4 KiB to 16 KiB physical flash pages grouped into 1 MiB or 2 MiB erase blocks. Aligning partition start sectors to 1 MiB prevents "split page writes," significantly boosting read/write speeds and extending the lifespan of your flash drive.
3. Resizing & Moving Partitions¶
Resizing allows you to expand a partition into adjacent free space or shrink it to free up capacity for another volume.
flowchart TD
subgraph Grow["Growing a Partition"]
G1["1. Expand Partition Boundary in parted"] --> G2["2. Expand Filesystem (resize2fs / resize.f2fs)"]
end
subgraph Shrink["Shrinking a Partition"]
S1["1. Check Filesystem (fsck)"] --> S2["2. Shrink Filesystem (resize2fs)"] --> S3["3. Shrink Partition Boundary in parted"]
end
How to Resize a Partition¶
- Select the partition you want to modify.
- Tap Resize / Move (or press Ctrl + M).
- Drag the visual slider handles or type new values:
- To Expand: Ensure there is unallocated free space immediately following or preceding the partition.
- To Shrink:
fpartedcalculates the minimum safe size based on actual data usage. Shrinking is supported onext2/3/4. - Tap OK.
fpartedautomatically orders the filesystem and partition resizing commands in the mathematically correct order to prevent data truncation.
Moving a Partition (3-Case Algorithm)¶
When you move a partition's start sector, fparted analyzes the geometry and selects the safest algorithm:
- Non-Overlapping Move: If the new position does not overlap with the old position, data is copied block-by-block directly.
- Overlapping Left Move: Data is copied starting from the beginning of the partition moving forwards.
- Overlapping Right Move: Data is copied starting from the end of the partition moving backwards, preventing new blocks from overwriting unread data.
4. Editing Partition Flags, Names, and UUIDs¶
Partition flags tell the operating system kernel and bootloader how to treat specific partition slices.
- Select a partition and tap Edit (or press F2).
- Available options in the Edit dialog:
- GPT Partition Name: Set UTF-16 names like
boot,recovery,dtbo,vendor. - Partition Flags:
boot: Marks partition as bootable (active partition on MBR).esp: EFI System Partition (used for UEFI bootloaders).hidden: Hides the partition from conventional Windows file managers.lvm: Marks partition as a physical volume for Logical Volume Manager.diag: Diagnostic / recovery partition.
- Regenerate UUID: Generates a completely new random UUID (Universally Unique Identifier) for the partition and filesystem, resolving clone conflicts.
- Tap Save to stage the changes.
5. Deleting Partitions¶
- Select the partition you wish to delete.
- Tap Delete (or press the Delete key on a physical keyboard).
- The partition is removed from the virtual preview, and its space is immediately returned to the unallocated free pool in the visual graph.
[!NOTE] Deleting a partition simply stages the removal in the queue. Your real data on flash storage is untouched until you explicitly click Apply.