Can't mount NFS share on Ubuntu/KubuntuCan't mount NFS share on Ubuntu/Kubuntu

Posted July 20th, 2008 in Linux/Unix/BSD

I set up a new Kubuntu 8.04 machine the other day and needed to mount an NFS share from another machine. I was surprised to get the "wrong fs type, bad option, bad superblock..." error when I tried to mount the share because it was working fine when I connected from another machine. This post looks at the reason for the error and the very simple solution. It should work for any Ubuntu/Kubuntu install.

After attempting to mount the NFS share either as a normal user or as the root user like so, where "/my/exported/path" is the path exported from the NFS server and "/my/mount/point" is where I was trying to mount it:

sudo mount -t nfs 192.168.1.15:/my/exported/path /my/mount/point

I got the following error message:

mount: wrong fs type, bad option, bad superblock on 192.168.1.15:/my/exported/path,
       missing codepage or helper program, or other error
       (for several filesystems (e.g. nfs, cifs) you might
       need a /sbin/mount.<type> helper program)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

I tried mounting it from another machine that I knew it worked from (a Kubuntu 7.10 install) and that worked fine. I then actually read the error message and decided to try using "/sbin/mount.nfs" instead of "mount" and of course the file wasn't there. So it would appear a base install of Kubuntu from the desktop/live CD doesn't include NFS as a filesystem type.

To fix the problem, open up the Adept or Synaptic package managers, search for nfs-common and install it. Alternatively do it from the command line like so:

sudo apt-get install nfs-common

After the installation of nfs-common has finished you should then be able to mount the NFS share.

Recent posts: