1

using the command

sudo mount 192.168.1.120:/complete /mnt/complete

works fine, and I can now see the network files in /mnt/complete. But if I add the exact same command (minus the sudo) to /etc/fstab, it tells me the mount point doesn't exist. I think my syntax is correct - it's an nfs file share

0

1 Answer 1

0

/etc/fstab does not work like the mount command. They are related but they don't have the same syntax.

/etc/fstab uses a device, mount point, file system type, options, dump, pass syntax. Everything is separated by an arbitrary amountof whitespace (enters signify new entries, so don't use that). It is described in man 5 fstab in more detail, but I'll give a sample NFS entry here.

Server:/path/to/export /local_mountpoint nfs <options> 0 0

So the server is the IP of the NFS share. The path to export is the exact path which you want to mount. I will assume it is the root directory. The local mountpoint is the place where you want to mount it on your actual computer, which is /mnt/complete in your situation. nfs is the file system type. can be set to defaults unless you need specific ones; if you need multiple, then check man 5 fstab for more details. Keep the first 0 to 0; dump is not needed. And pass is not really needed unless you want to check the filesystem. Then set it to 2. So a sample file system entry for you is:

192.168.1.120:/ /mnt/complete nfs defaults 0 2

0

You must log in to answer this question.

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