Skip to content

fix(initramfs): mount hot-attached FAT drives with utf8 - #48

Merged
nsaintot merged 1 commit into
nsaintot:mainfrom
9c5s:fix/usb-vfat-utf8
Oct 21, 2026
Merged

nsaintot merged 1 commit into
nsaintot:mainfrom
9c5s:fix/usb-vfat-utf8

Conversation

@9c5s

@9c5s 9c5s commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Problem

A FAT32 USB drive that the host attaches at run time, or restores at launch, is mounted by usb-external-attach.sh with rw,noatime,shortname=mixed,dmask=000,fmask=000,flush. Without utf8, the guest kernel's defaults apply (CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1", CONFIG_FAT_DEFAULT_UTF8 unset), and a long name outside ASCII reads back as ?:

# ls /media/usb/sdb1/Contents
1000???(CV_????)

The browser still lists every track, because it reads export.pdb and the ANLZ files, but loading a track whose path holds such a name fails:

createReaderFor failed! kFileOpen
 /media/usb/sdb1/Contents/<artist in Japanese>/<album>/<track>.mp3

The deck then shows "Media or File is collapsed or unavailable." and E-8302: CANNOT PLAY TRACK(3000).

Change

Mount vfat with the options of the deck's own device-mount.sh (/home/root/scripts/device-mount.sh in the firmware rootfs), which 10-usb-drive-mount.sh already uses: this adds codepage=437,iocharset=iso8859-1,usefree,utf8. exfat is unaffected, since its kernel default iocharset is already utf8.

The script is written at install time, so a slot gets the fix on reinstall. I did not raise FEATURE_SET: an outdated slot boots without mods (launch.rs treats it as having no mods runner), which seemed heavier than this fix needs. I can raise it if you would rather prompt the reinstall.

Testing

macOS 15.7.3 (arm64), v0.4.0, a CDJ-3000 3.22 slot, and a rekordbox 7 export on a FAT32 USB SSD whose folder and file names are mostly Japanese:

  • Before: names read back as ?, and loading such a track failed with E-8302.
  • After: /proc/mounts shows usefree,utf8, the names list correctly, and the track loads and plays. A second deck loads tracks from the first deck's USB over Pro DJ Link, and beat-link-trigger shows their metadata, waveforms, beat grid and phrases.

I tested v0.4.0's copy of the script with the same line changed, appended to the slot's initramfs-patched.cpio.gz, rather than a reinstall from a build of this branch. bash -n and shellcheck pass on the patch script.

usb-external-attach.sh mounted vfat without utf8, so the guest kernel's
iso8859-1 default applied and a long name outside ASCII read back as
'?'. The app then could not open a track whose path held such a name
(createReaderFor failed! kFileOpen) and showed E-8302. Mount with the
options of the deck's own device-mount.sh, which 10-usb-drive-mount.sh
already uses.
@nsaintot

Copy link
Copy Markdown
Owner

Thanks for reporting, clear and concise fix. Agree on not bumping the FEATURE_SET (which may need some fine tuning for the FS_MODS_RUNNER)

@nsaintot
nsaintot merged commit 0c7fd16 into nsaintot:main Oct 21, 2026
16 of 17 checks passed
@9c5s
9c5s deleted the fix/usb-vfat-utf8 branch October 21, 2026 16:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants