Skip to content

Filesystem Operations & Integrity

fparted orchestrates formatting, checking, repairing, labeling, and mounting through explicit StorageOperation models.


🛠️ Formatting a Filesystem

The Format Partition dialog configures target filesystem type and optional volume labels: - Emits FormatFilesystemOperation. - Preflight Check: Target device must be fully unmounted. - Enforces filesystem-specific naming rules (e.g. FAT32 11-char uppercase vs ext4 16-char labels). - Automatically formats with force flags (-F, -f, -Q) while targeting the explicit partition node.


🩺 Check & Repair (fsck)

The Check & Repair dialog exposes two modes: 1. Read-Only Check Mode: - e2fsck -fn <dev> / fsck.fat -n <dev> / fsck.exfat -n <dev> - Inspects inode tables, allocation bitmaps, and superblocks without writing any changes to disk. - Reports anomalies without risk. 2. Interactive Repair Mode: - e2fsck -fy <dev> / fsck.fat -a <dev> / fsck.f2fs -f <dev> - Automatically resolves inconsistent block counts, orphaned inodes, and directory loops.


🏷️ Filesystem Label Management

The Set Filesystem Label operation changes disk volume names without altering partition boundaries or touching stored files:

# ext2/3/4
e2label /dev/block/sda1 "DataDrive"

# FAT32
fatlabel /dev/block/sda1 "USB_STICK"

# exFAT
exfatlabel /dev/block/sda1 "SDCARD"

# Btrfs
btrfs filesystem label /dev/block/sda1 "BtrfsPool"

📂 Mount & Unmount Operations

  • Mount: Executes mount -o ro or mount to map block partitions to specified target paths (e.g. /mnt/runtime/default/...).
  • Unmount: Executes umount <dev> to safely flush kernel dirty buffers and detach the mount point before destructive operations.
  • Inherently read-only filesystems (Squashfs, EROFS, DwarFS, ISO9660, UFS) are automatically forced to -o ro.