271

When mounting an NFS directory by doing:

sudo mount 192.168.1.5:/home/shared /mnt/common

I get the following error:

mount: wrong fs type, bad option, bad superblock on 192.168.1.5:/home/shared, 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.

The kernel is up to date.

The question was already asked (for example here and here), but are either not answered or the answers are not helpful in my case.

What is wrong?

5
  • 4
    I met this issue before, just install an extended tool sudo apt-get install cifs-utils
    – user413408
    May 25, 2015 at 1:41
  • 2
    user413408's fix didn't help me.
    – Nuzzolilo
    Jan 1, 2016 at 20:42
  • 1
    Similar issues can be solved on CentOS clients by sudo yum install nfs-utils.
    – MarkHu
    May 20, 2016 at 23:38
  • had the same error, because the drive had to be partitioned first! May sound obvious, but just putting it out there to start there.
    – MrE
    Aug 6, 2016 at 23:04
  • If the error relates to setting up an sshfs mount, the sshfs package may be missing (fix with sudo apt install sshfs or sudo yum install sshfs etc) Nov 30, 2020 at 12:27

7 Answers 7

386

The error message mentions:

(for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program)

This is relevant given that you are trying to mount NFS. The /sbin/mount.nfs helper program is provided by nfs-common. You can install it with:

sudo apt install nfs-common

On the other hand, if you are trying to mount CIFS, the helper program is provided by cifs-utils. You can install it with:

sudo apt install cifs-utils
5
  • 40
    Meaning: apt-get install nfs-common, if /sbin/mount.nfs is not already there. Feb 10, 2015 at 8:15
  • 9
    This did it for me: "sudo apt-get install cifs-utils".
    – ttt
    Mar 30, 2017 at 9:18
  • On ubuntu 14 "/sbin/mount.nfs" is already present but still unable to mount with the same error mentioned. After installing "nfs-common", I was able to mount without any issues.
    – Ashwin
    Oct 5, 2017 at 7:35
  • 1
    your package might be nfs-utils
    – msb
    Jan 22, 2019 at 1:56
  • It is worth to note, make sure you are not getting "/sbin/mount.nfs" mixed up with "/sbin/mount.ntfs". The latter is a different file system, specifically coming out of the microsoft world. nfs and ntfs are two different file systems and are not compatible
    – thxmike
    Dec 13, 2019 at 14:54
73

Make sure mount.cifs is listed into /sbin:

ls -l /sbin/mount.cifs

Check to see if package cifs-utils is installed:

dpkg -l cifs-utils

If it isn't, install the cifs libraries with

sudo apt-get install cifs-utils
5
  • 11
    cifs can be installed via the cifs-utils package.
    – Minos
    Oct 9, 2014 at 14:19
  • I had to reinstall cifs-utils on my system for some reason, it said it was installed, but the file at /sbin/mount.cifs was missing.
    – dessalines
    May 25, 2016 at 17:50
  • 2
    This combined with sudo mount -t cifs //SERVER/FOLDER /media/FOLDER -o username=USER,domain=DOMAIN command enables you to mount file shares on Windows active directory domains. Jun 3, 2016 at 18:56
  • cifs-utils provides tools for working with samba shares (SMB/CIFS protocols), but OP needed to mount NFS shares, and needs to install nfs-common package instead, as suggested in this answer. NFS is different from SMB/CIFS!
    – gerlos
    Aug 25, 2016 at 15:21
  • YES READ OP. "When mounting an NFS directory" As mentioned: you need nfs-common normally installed. Why are all these other answers upvoted? Answered above. This does hold true for CIFS mounting. But wasn't the question.
    – B. Shea
    Sep 24, 2016 at 17:01
24

It appears that nfs-common package should be installed in order to be able to mount NFS directories.

sudo apt-get install nfs-common

When it's not, the mounting of an NFS directory results in the error I've got.

0
6

I solved it by installing virtualbox. Do

sudo apt-get install virtualbox-guest-utils

It installs the mount.vboxsf

3
  • 4
    What makes you think the OP is running a virtualbox guest ?
    – Panther
    Apr 9, 2015 at 3:58
  • 3
    I find this answer alright if he saw the same error when trying to connect from a Virtualbox guest, and he installed the virtualbox-guest-utils to solve the problem. It does not answer the OP question but answers somebody else facing the problem with virtualbox guest. Jun 9, 2016 at 13:30
  • 1
    Although this may not answer OP's question, it solved my problem.
    – Paul
    Dec 21, 2017 at 22:47
2

Try:

mount -t nfs 192.168.1.5:/home/shared /mnt/common
1
  • 1
    Yes, but also first you need to be sure you already installed nfs-common. Otherwise this wont work as well.
    – dawciobiel
    Mar 1, 2020 at 5:31
2

I was having this same problem in Ubuntu 14.04 LTS. I tried the nfs-common package install without any success.

I was able to resolve the same issue you had by:

  1. Going to the Linux "disks" application.
  2. Clicking the USB drive I was trying to mount in the devices section (window left).
  3. Clicking more actions under the Volumes filesystem partition section (two little gears right of the minus/plus signs).
  4. Clicking edit mount options (top of the mount options window).
  5. Clicking to TURN ON Automatic Mount Options.
  6. Then clicking the mount button (+ sign under volumes) -- this should change to a square.

This mounted my USB drive and resolved the issue.

0

For me on ubuntu 22.04: Gparted guided as below: enter image description here

After installing the ntfs-3g it works fine:

sudo apt install ntfs-3g

You must log in to answer this question.

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