FreeBSD auto-mount USB drives

 

FreeBSD auto-mount USB

 

 

 

How to auto mount a USB drive in FreeBSD

 

We will use devd

 

Install the automount port

 

 

cd /usr/ports/sysutils/automount

 

make install clean

 

 

 

We bring the automount.conf file, the location of which is in

/usr/local/etc/automount.conf to this form:

 

 

 

USERUMOUNT=YES

 

FM="pcmanfm --browser --no-desktop"

 

#USER=vermaden

 

#ENCODING=pl_PL.ISO8859-2

CODEPAGE=cp866

 

 

 

 

 

#Personal Settings

 

 

USER=user

 

ENCODING=ru_RU.UTF-8

 

REMOVEDIRS=YES

ATIME=NO

 

 

 

where user is your username

 

 

If you need to mount NTFS flash drives, then install the fusefs-ntfs port

 

 

 

cd /usr/ports/sysutils/fusefs-ntfs

 

make install clean

 

 

 

You need to load the kernel module by changing the configuration file loader.conf

 

 

that is,

 

 

add this line

 

fuse_load="YES"

 

in

 

/boot/loader.conf

 

That's all.