# HOWTO: FreeBSD Desktop - Part 17 - Automount Removable Media



## vermaden (Oct 11, 2018)

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.

FreeBSD Desktop – Part 1 – Simplified Boot
FreeBSD Desktop – Part 2 – Install
FreeBSD Desktop – Part 3 – X11 Window System
FreeBSD Desktop – Part 4 – Key Components – Window Manager
FreeBSD Desktop – Part 5 – Key Components – Status Bar
FreeBSD Desktop – Part 6 – Key Components – Task Bar
FreeBSD Desktop – Part 7 – Key Components – Wallpaper Handling
FreeBSD Desktop – Part 8 – Key Components – Application Launcher
FreeBSD Desktop – Part 9 – Key Components – Keyboard/Mouse Shortcuts
FreeBSD Desktop – Part 10 – Key Components – Locking Solution
FreeBSD Desktop – Part 11 – Key Components – Blue Light Spectrum Suppress
FreeBSD Desktop – Part 12 – Configuration – Openbox
FreeBSD Desktop – Part 13 – Configuration – Dzen2
FreeBSD Desktop – Part 14 – Configuration – Tint2
FreeBSD Desktop – Part 15 – Configuration – Fonts & Frameworks
FreeBSD Desktop – Part 16 – Configuration – Pause Any Application
FreeBSD Desktop – Part 17 – Automount Removable Media
Regards.


----------



## Deleted member 48958 (Oct 11, 2018)

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
> ...



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.


----------

