HOWTO: FreeBSD Desktop - Part 17 - Automount Removable Media

vermaden

Son of Beastie

Thanks: 1,046
Messages: 2,695

#1
I would like to share HOWTO in π…π«πžπžππ’πƒ πƒπžπ¬π€π­π¨π© series about fonts and frameworks.

FreeBSD Desktop - Part 17 - Automount Removable Media
https://vermaden.wordpress.com/2018/10/11/freebsd-desktop-part-17-automount-removable-media/

You may also like earlier articles in the series.
Regards.
 

ILUXA

Aspiring Daemon

Thanks: 361
Messages: 593

#2
vermaden said:
β€’ autofs(8)
+ supports MTP devices (Android phones for example)
+ is available in the base system
- does not allow custom mount options per filesystem
- does not provide log file
- does not support BTRFS or XFS (can be added)
- does not work πŸ™‚
Autofs is working pretty well for me, without any issues,
right now I'm using it with 10.4-RELEASE but it's working fine in 11.* also.
I configured it using instructions from this topic - Autofs. Share your experience.
Here is example of automounted USB card reader with 2Gb micro sd card formatted in FAT32:


vermaden said:
To have MTP support you will also have to install sysutils/fusefs-simple-mtpfs and add the /mtp -simple-mtpfs -allow_other line to the /etc/auto_master file. Along with fuse_load=YES in the /boot/loader.conf file.

After doing all these I attached USB device and Android phone but nothing happened.
After adding "fuse_load=YES" to /boot/loader.conf did you reboot your machine?
It is required to load fuse kernel module, or at least # kldload fuse should be executed,
you're missing this step in your how to, without fuse kernel module loaded, autofs won't work with mtp map.
But it should work with regular "msdosfs" formatted flash drives "out of the box".
Also check your device permissions, because autofs is working pretty well,
some people have reported that it's working also fine for them too.

Also to mount something with autofs, you should open device mount point first -
/media/<something> or /mtp/<something>, it won't be automounted without this.
Also, after adding "-simple-mtpfs" map to /etc/auto_master, # mkdir /mtp should be executed,
this mount point doesn't exist by default. Also to use autofs with mtp, installation
of sysutils/fusefs-simple-mtpfs is required, it won't work if it isn't installed.
 
Top