I have a NAT drive, that is accessible via SMB. I have an entry in fstab to mount it at boot. But if the drive is not switched on it is not mounted during boot and I have to manually mount later. (The NAT boots a lot slower than my PC and usually is not up at the point PC tries to mount it).

Is there a way to automatically mount the drive when it becomes available in the network? Preferably if it can be done via command line tools, not involving GUI programs.

Using PCLinuxOS with KDE.

  • I'm presuming that you have a NAS drive.
    – Kevin M
    Aug 21, 2010 at 12:32

1 Answer 1


What you're looking for is AutoFS. Install the RPM, then make sure that it's running at start(RH/etc: chkconfig autofs on). Edit the file /etc/auto.master and add the following line: /media/ /etc/auto.media. If I were you, I would change "media" in both places to be the name of your root-level directory. Then edit the file /etc/auto.media and add finaldirname mount-options \\\sharename

A quick google gives this page.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .