Skip to content

USB Stick Formatter 1.6.6 creates invalid exFAT filesystems on multiple drives #153

Description

@MicBosi

System

  • Linux Mint 22.3 Zena Cinnamon
  • Kernel: 7.0.0-28-generic
  • mintstick: 1.6.6
  • exfatprogs: 1.2.2-1build1

Reproduction

  1. Open Linux Mint USB Stick Formatter.
  2. Select a USB drive.
  3. Select exFAT, enter a label, and format.
  4. Wait for the UI to report completion.
  5. Unplug and reconnect the drive.

Actual result

The resulting filesystem is not recognized or mountable. This reproduced on two different USB devices.

Device 1: SanDisk 3.2 Gen1, 125 GB

After formatting with mintstick, the kernel reported:

exFAT-fs (sdb1): bogus allocation bitmap size(need : 119283, cur : 119357)

Device 2: Kingston DataTraveler 3.0, 495 GB

After formatting with mintstick, this read-only check:

sudo fsck.exfat -n /dev/sdb1

reported:

Bad fs_name in boot sector, which does not describe a valid exfat filesystem

In both cases, lsblk showed the partition but did not detect a filesystem type.

Expected result

The formatter should create a valid exFAT filesystem, verify that formatting succeeded, and only then report completion.

Working command-line workaround

Reformatting each same partition directly with exfatprogs worked:

sudo mkfs.exfat -n LABEL /dev/sdb1

Afterward, Linux detected exFAT 1.0 and fsck.exfat -n reported the filesystem as clean.

Suspected cause

This is an inference from the observed behavior and installed mintstick source.

/usr/lib/mintstick/raw_format.py recreates the partition table and immediately runs wipefs and mkfs.exfat on the new partition path. Its execute() function calls commands with subprocess.call() but does not inspect or propagate nonzero return codes. There is also no visible partprobe, udevadm settle, or equivalent wait after recreating the partition table.

This may allow formatting against stale partition geometry, or allow a failed command to be ignored while the UI still reports success.

Please consider:

  • checking and propagating every subprocess return code;
  • waiting for the kernel and udev to recognize the new partition geometry;
  • verifying the result with blkid or fsck.exfat -n before reporting success.

A possibly related older report is #118.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions