Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 17 Mar 2020 10:38:06 -0600
From:      Gary Aitken <freebsd@dreamchaser.org>
To:        Polytropon <freebsd@edvax.de>, Claude Buisson <claude.buisson1@free.fr>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: SD card formatting
Message-ID:  <be3085f1-6e6d-aa60-bc84-2e4c5c8ae89c@dreamchaser.org>
In-Reply-To: <5ff4694f-15a3-27f3-8ec8-14fd172c91ad@dreamchaser.org>
References:  <b7070f0e-a387-9c7e-945f-ab708f9f5a76@dreamchaser.org> <8a95e209-52f1-6873-9500-9e1bdd826e18@free.fr> <20200317153013.7257bbe1.freebsd@edvax.de> <5ff4694f-15a3-27f3-8ec8-14fd172c91ad@dreamchaser.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?be3085f1-6e6d-aa60-bc84-2e4c5c8ae89c>