I'm using a Debian distribution on an ARM system (armv7l).
I have to configure the system so that the USB pendrive has to be mounted/unmounted in automatic when it is plugged/unplugged in the USB port.
The mount point must always be the same: /media/usb0.
If I use the commands:
Code: Select all
/bin/mount -tauto -osuid,rw,user,sync,exec,nodev,noatime,nodiratime,umask=0000 /dev/sda1 /media/usb0
umount -l /media/usb0
To automate the procedure I'm using "usbmount" with the patch described in this article:
https://raspberrypi.stackexchange.com/q ... essie-lite
All works fine with NTFS disks, that are mounted in this way (as fuseblk):
Code: Select all
root@cl-som-imx6ul-sid:~# mount
.....
/dev/sda1 on /media/usb0 type fuseblk (rw,nosuid,nodev,relatime,sync,user_id=0,group_id=0,allow_other,blksize=4096,user)
In fact, after removing the usb pendrive, I still have this entry:
Code: Select all
root@cl-som-imx6ul-sid:~# mount
.....
/dev/sda1 on /media/usb0 type vfat (rw,nosuid,nodev,relatime,sync,uid=1000,gid=1000,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
The command "umount -l /media/usb0" works, while "usbmount" can't unmount the disk in the right way.
Thank you very much
Claudio