I have a raspberry Pi and using Raspbian (without the GUI) and need USB pen drives to be mounted to /media/usb and cdrom drive to be mounted to /media/cdrom.
I have set up a script using autofs
/media /etc/auto.media --timeout=2
cdrom -fstype=iso9660,ro,nosuid,nodev :/dev/cdrom usb -fstype=vfat,rw,nosuid,nodev :/dev/sda1
However it doesn't seem to be working, what would be the best method to have these auto mount? Or is there just something wrong with my scripts?
The pen drive is always
/dev/sda1 or at least
/dev/sda but for my purposes it will always be the first partition, the memory card in a pi is
I have also checked that
autofs is running.
Seems the respective folder in /media is not being created, and if i try to create it myself i get permission denied even as root.
/media permissions are:
drwxr-xr-x 2 root root 0