Solved mounting exFAT usb with freebsd

I decided that, for data-mining purposes, this should be a new thread. It could be considered a continuation of this one: https://forums.freebsd.org/threads/problems-mounting-usb-flash-drive.83981/ .

I formatted a usb-key with exFAT using ubuntu. I then followed the instructions here: https://www.femtopc.com/mount_NTFS_EXFAT.php to mount it.
It calls for two installations:
Code:
# cd /usr/ports/sysutils/fusefs-ntfs && make install clean
# cd /usr/ports/sysutils/fusefs-exfat && make install clean
(I got told that they were installed already -> I vaguely remember doing this months ago),
and three additions to rc.conf and bootloader.conf:
Code:
# echo 'fusefs_enable="YES"' >> /etc/rc.conf
# echo 'fusefs_safe="YES"' >> /etc/rc.conf
# echo 'fusefs_safe_evil="YES"' >> /etc/rc.conf
# echo 'fuse_load="YES"' >> /boot/loader.conf
I then have to manually load the kernel module:
Code:
# kldload fuse
This is where all hell breaks loose:
Code:
root@ozzie:/home/eriadar #  kldload fuse
kldload: an error occurred while loading module fuse. Please check dmesg(8) for more details.
dmesg gives:
Code:
interface fusefs.1 already present in the KLD 'fusefs.ko'!
linker_load_file: /boot/kernel/fuse.ko - unsupported file type

Perhaps relevant, I have also tried:
Code:
sysrc kld_list+=fuse
with a reboot.
kldstat gives me:
Code:
root@ozzie:/home/eriadar # kldstat
Id Refs Address                Size Name
 1  132 0xffffffff80200000  227ad00 kernel
 2    1 0xffffffff8247b000     7f78 acpi_video.ko
 3    1 0xffffffff82483000     3b58 snd_driver.ko
 4    2 0xffffffff82487000     7278 snd_vibes.ko
 5    2 0xffffffff8248f000     5050 snd_via82c686.ko
 6    2 0xffffffff82495000     5de8 snd_t4dwave.ko
 7    4 0xffffffff8249b000     2528 snd_spicds.ko
 8    2 0xffffffff8249e000     8038 snd_solo.ko
 9    5 0xffffffff824a7000     5c40 snd_sbc.ko
10    2 0xffffffff824ad000     5808 snd_sb8.ko
11    2 0xffffffff824b3000     58b8 snd_sb16.ko
12    2 0xffffffff824b9000    12598 snd_neomagic.ko
13    3 0xffffffff824cc000    15348 snd_mss.ko
14    2 0xffffffff824e2000     c870 snd_maestro3.ko
15    2 0xffffffff824ef000     c500 snd_maestro.ko
16    2 0xffffffff824fc000     4a08 snd_fm801.ko
17    2 0xffffffff82501000     8258 snd_ess.ko
18    2 0xffffffff8250a000     9dc8 snd_envy24ht.ko
19    2 0xffffffff82514000     b478 snd_envy24.ko
20    2 0xffffffff82520000     d210 snd_ds1.ko
21    2 0xffffffff8252e000     64a0 snd_cs4281.ko
22    2 0xffffffff82535000     7df0 snd_atiixp.ko
23    2 0xffffffff8253d000     6848 snd_als4000.ko
24    2 0xffffffff82544000     92d8 snd_ad1816.ko
25    1 0xffffffff8254e000    27ce8 fusefs.ko
26    1 0xffffffff82721000   12bf6c i915kms.ko
27    1 0xffffffff8284d000    75e10 drm.ko
28    4 0xffffffff828c3000    12d30 linuxkpi.ko
29    3 0xffffffff828d6000    13f30 linuxkpi_gplv2.ko
30    2 0xffffffff828ea000      6d0 debugfs.ko
31    1 0xffffffff828eb000     31c8 acpi_ibm.ko
32    1 0xffffffff828ef000    16bf0 if_iwm.ko
33    1 0xffffffff82906000   10046f iwm7260fw.ko
34    1 0xffffffff82a07000     1860 uhid.ko
35    1 0xffffffff82a09000     2908 ums.ko
36    1 0xffffffff82a0c000     1a40 wmt.ko
To confirm:
Code:
root@ozzie:/home/eriadar # vi /boot/loader.conf

fusefs_load="YES"
acpi_video_load="YES"
hw.psm.synaptics_support="1"
snd_driver_load="YES"
fuse_load="YES"
 
… three additions to rc.conf and bootloader.conf:

You can/should remove those.

Code:
root@mowa219-gjp4-8570p-freebsd:~ # lsblk da2
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
da2              0:206 1.9G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da2p1          0:202 1.9G ms-basic-data          gpt/Microsoft%20basic%20data -
root@mowa219-gjp4-8570p-freebsd:~ # mkexfatfs /dev/da2p1
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
root@mowa219-gjp4-8570p-freebsd:~ # mkdir /tmp/fatty
root@mowa219-gjp4-8570p-freebsd:~ # mount.exfat-fuse /dev/da2p1 /tmp/fatty
FUSE exfat 1.3.0
root@mowa219-gjp4-8570p-freebsd:~ # touch /tmp/fatty/touchy.txt
root@mowa219-gjp4-8570p-freebsd:~ # file /tmp/fatty/touchy.txt
/tmp/fatty/touchy.txt: empty
root@mowa219-gjp4-8570p-freebsd:~ # umount /tmp/fatty
root@mowa219-gjp4-8570p-freebsd:~ # fstyp /dev/da2p1
exfat
root@mowa219-gjp4-8570p-freebsd:~ # exit
logout
% grep -i fuse /boot/loader.conf
# fusefs_load="YES"
% sysrc kld_list
kld_list: fusefs radeonkms filemon
%


loader.conf(5)


Code:
root@ozzie:/home/eriadar # vi /boot/loader.conf

fusefs_load="YES"
acpi_video_load="YES"
hw.psm.synaptics_support="1"
snd_driver_load="YES"
fuse_load="YES"

Neither of those two fuse… lines is required.

One of the two is wrong.

Load the module early only if the absence of a FUSE mount will cause a problem whilst starting FreeBSD, which is extremely unlikely in this case. (Something other than FreeBSD produced the file system.)

rc.conf(5)


… also tried:

sysrc kld_list+=fuse

with a reboot. …

The FemtoPC page, from which you copied, is wrong. Probably outdated.

Instead:

sysrc kld_list+=fusefs && kldload fusefs
  • safely edits /etc/rc.conf
  • loads the kernel module, without requiring a reboot of the OS.
If the module is already loaded, you'll get the normal message:

kldload: can't load fusefs: module already loaded or in kernel

… all hell breaks loose: …

It's simply a message, not an error, not Hellish (although it might feel that way if you're following documentation that's wrong).

You'll find the first part of the command under <https://docs.freebsd.org/en/books/handbook/disks/#using-ntfs>, which is for NTFS, but the essence is the same:
  • fusefs
 
You can/should remove those.

Code:
root@mowa219-gjp4-8570p-freebsd:~ # lsblk da2
DEVICE         MAJ:MIN SIZE TYPE                                          LABEL MOUNT
da2              0:206 1.9G GPT                                               - -
  <FREE>         -:-   1.0M -                                                 - -
  da2p1          0:202 1.9G ms-basic-data          gpt/Microsoft%20basic%20data -
root@mowa219-gjp4-8570p-freebsd:~ # mkexfatfs /dev/da2p1
mkexfatfs 1.3.0
Creating... done.
Flushing... done.
File system created successfully.
root@mowa219-gjp4-8570p-freebsd:~ # mkdir /tmp/fatty
root@mowa219-gjp4-8570p-freebsd:~ # mount.exfat-fuse /dev/da2p1 /tmp/fatty
FUSE exfat 1.3.0
root@mowa219-gjp4-8570p-freebsd:~ # touch /tmp/fatty/touchy.txt
root@mowa219-gjp4-8570p-freebsd:~ # file /tmp/fatty/touchy.txt
/tmp/fatty/touchy.txt: empty
root@mowa219-gjp4-8570p-freebsd:~ # umount /tmp/fatty
root@mowa219-gjp4-8570p-freebsd:~ # fstyp /dev/da2p1
exfat
root@mowa219-gjp4-8570p-freebsd:~ # exit
logout
% grep -i fuse /boot/loader.conf
# fusefs_load="YES"
% sysrc kld_list
kld_list: fusefs radeonkms filemon
%



loader.conf(5)




Neither of those two fuse… lines is required.

One of the two is wrong.

Load the module early only if the absence of a FUSE mount will cause a problem whilst starting FreeBSD, which is extremely unlikely in this case. (Something other than FreeBSD produced the file system.)

rc.conf(5)




The FemtoPC page, from which you copied, is wrong. Probably outdated.

Instead:

sysrc kld_list+=fusefs && kldload fusefs
  • safely edits /etc/rc.conf
  • loads the kernel module, without requiring a reboot of the OS.
If the module is already loaded, you'll get the normal message:





It's simply a message, not an error, not Hellish (although it might feel that way if you're following documentation that's wrong).

You'll find the first part of the command under <https://docs.freebsd.org/en/books/handbook/disks/#using-ntfs>, which is for NTFS, but the essence is the same:
  • fusefs

Greetings! ..I apologize for not having responded to you earlier! (..I assume that's why you edited your answer..?) I tried your solution, at least the first part, and it worked! File system created! ..then.. I tried to move my file onto it. ..eek.. ..the problem:
Code:
root@ozzie:/home/eriadar/email_backup_from_freebsd # cp all_mail_including_spam_and_trash.mbox /tmp/fatty
cp: /tmp/fatty/all_mail_including_spam_and_trash.mbox: Interrupted system call
root@ozzie:/home/eriadar/email_backup_from_freebsd # cd
root@ozzie:~ # cd /tmp/fatty
root@ozzie:/tmp/fatty # ls
all_mail_including_spam_and_trash.mbox
root@ozzie:/tmp/fatty # ls -l
total 9428224
-rwxrwxrwx  1 root  wheel  9654501376 Apr  4 03:04 all_mail_including_spam_and_trash.mbox
root@ozzie:/tmp/fatty #
The file I tried to move is 11Gigs, so it -almost- all got transferred before something funky happened. ..my theory is that the "Interrupted system call" occurred when I tried to move my computer, ever so gently, somewhere more out-of-the-way, but still wasn't quite gentle enough. Perhaps somebody can confirm if that's likely? Or is there some other problem? I'll check out the rest of your edited post once I've posted this! :-) Then.. I'll probably start the transfer again, once the computer is already moved..
 
Back
Top