SD card formatting

Gary Aitken freebsd at dreamchaser.org
Tue Mar 17 16:39:42 UTC 2020


On 3/17/20 10:08 AM, Gary Aitken wrote:
> On 3/17/20 8:30 AM, Polytropon wrote:
>> On Tue, 17 Mar 2020 00:37:21 +0100, Claude Buisson wrote:
>>> On 2020-03-15 22:39, Gary Aitken wrote:
> ...
>>> Your card with a capacity > 32GB must be formatted as exFAT
>>>
>>> The partition type seen by gpart is the same as NTFS
>>>
>>> man gpart
>>>    ...
>>>    ntfs      A partition that contains a NTFS or exFAT filesystem
>>>
>>> see also Bug 244461
>>
>> Excellent finding!
>>
>> I think this is the key to a solution. The remaining questions are:
>>
>> 1. How to mount exFAT on FreeBSD?
>>
>> I think I can answer that: A FUSE module is required. Install
>> fusefs-exfat (and maybe exfat-utils) from the sysutils category
>> to get mount.exfat and exfatfsck (if it should be needed).
>> Inegration with /etc/fstab should be no problem.
>>
>> 2. How to initialize a exFAT SD card on FreeBSD?
>>
>> Probably with mkexfatfs from exfat-utils (as mentioned above).
> 
> Will try that.  However...
> I've installed a huge amount of stuff from packages, and no package
> exists for either fusefs-exfat or exfat-utils.  If I try to build
> from ports, I run into a conflict with perl5:
> 
> ===>  Patching for fusefs-exfat-1.2.8
> ===>  Applying FreeBSD patches for fusefs-exfat-1.2.8
> ===>   fusefs-exfat-1.2.8 depends on package: autoconf>=2.69 - not found
> ===>  autoconf-2.69_2 Invalid perl5 version 5.30.
> 
> Is there a way around this other than building everything from ports?
> except for distfiles, all the directories in my ports tree are 2019-07-04.
> I *thought* they would be compatible with the installed os and packages.
> 
> FreeBSD breakaway.dreamchaser.org 11.3-RELEASE-p6

hmmm, strange.
I did a pkg install of autoconf and automake and they installed ok,
was then able to make both fusefs-exfat and exfat-utils.

Attempting to mount a known good card formatted in the camera:

# mount.exfat -d -o ro /dev/da0s1 /mnt/memstick
FUSE exfat 1.2.8
fuse: failed to open fuse device: No such file or directory

grrr.

# dumpexfat /dev/da0s1
Volume label
Volume serial number      0x50478f5b
FS version                       1.0
Sector size                      512
Cluster size                  131072
Sectors count              124702720
Free sectors                31074560
Clusters count                486992
Free clusters                 121385
First sector                   32768
FAT first sector               16384
FAT sectors count              16384
First cluster sector           32768
Root directory cluster             4
Volume state                  0x0000
FATs count                         1
Drive number                    0x80
Allocated space                 255%

I don't understand the "No such file or directory" error, given that
dumpexfat found it.
I also don't understand the allocated space number...

Gary


More information about the freebsd-questions mailing list