linuxmint / linuxmint/mintstick
USB Stick Formatter 1.6.6 creates invalid exFAT filesystems on multiple drives
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 173
- Forks
- 64
- PR merge metrics
- No merged PRs in 30d
Description
System
- Linux Mint 22.3 Zena Cinnamon
- Kernel: 7.0.0-28-generic
- mintstick: 1.6.6
- exfatprogs: 1.2.2-1build1
Reproduction
- Open Linux Mint USB Stick Formatter.
- Select a USB drive.
- Select exFAT, enter a label, and format.
- Wait for the UI to report completion.
- 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
blkidorfsck.exfat -nbefore reporting success.
A possibly related older report is #118.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with /usr/lib/mintstick/raw_format.py and its execute() function, tracing the partition recreation, wipefs, and mkfs.exfat subprocess calls. Reproduce the formatter flow, then use lsblk, blkid, and fsck.exfat -n to check whether the resulting partition is recognized and clean before the UI reports completion.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- operating-systems, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 58/100