How to change /etc/auto.master to mount USB
How to change /etc/auto.master to automatically mount USB pen drive soon after connecting to USB.
|
The auto.master file has its own manpage: man 5 auto.master.
|
I found a way. Tell me if there is another better way to do it.
Add the following line to /etc/auto.master (can use "vi") /anyDirectory/anySubDirectory /etc/auto.anyname *above "/anyDirectory/anySubDirectory" should be created.(can use "mkdir") And add the following line to /etc/auto.anyname (you may have to create this file) anyNameForDevice -fstype=vfat,rw :/dev/sda1 then restart autofs (can use "service autofs restart") USB will be mounted to "/anyDirectory/anySubDirectory/anyNameForDevice" directory automatically when its pluged. this sub directory anyNameForDevice exsists only when the USB is pluged. |
One thing to check is if your distro uses udev rather than autofs. Try "ps -u root | grep udev" and "sudo /sbin/chkconfig autofs".
|
Quote:
Quote:
|
I should have said udev and subfs.
|
All times are GMT -5. The time now is 03:29 AM. |