Considering the following instructions I found online for how to auto-mount a directory at startup:

  1. Make the symlink:

    sudo ln -s `which gdfs` /sbin/mount.gdfs
  2. Add the entry to /etc/fstab:

    /var/cache/gdfs.creds /mnt/gdrivefs gdfs allow_other 0 0
  3. Optional: Manually mount

    mount /mnt/gdrivefs

What is the point of creating the symlink? Is that supposed to be necesary for adding something to fstab?

Why is the symlink called "mount.gdfs"? Why not just "gdfs"?

Is the mount. prefix a thing? Does the kernel know when it comes across the "gdfs" in that line in fstab to go looking for something with a "mount." prefix in sbin?

Thanks in advance!


When you run mount -t foo ..., or use an entry in fstab with filesystem foo, mount actually looks for mount.foo helper binary. From man mount in Ubuntu, for example:

For most types all the mount program has to do is issue a simple mount(2) system call, and no detailed knowledge of the filesystem type is required. For a few types however (like nfs, nfs4, cifs, smbfs, ncpfs) ad hoc code is necessary. The nfs, nfs4, cifs, smbfs, and ncpfs filesystems have a separate mount program. In order to make it possible to treat all types in a uniform way, mount will execute the program /sbin/mount.TYPE (if that exists) when called with type TYPE. Since various versions of the smbmount program have different calling conventions, /sbin/mount.smbfs may have to be a shell script that sets up the desired call.

So, no, the kernel is Jon Snow, but mount knows to look for /sbin/mount.* commands.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.