Australian cloud for business software — built and run in Sydney since 2002

NetLeverage
NetLeverage

mount: "wrong fs type, bad option, bad superblock" on Linux: work out which one it is

Technical article
Troubleshooting

About this article: This article is reviewed against the cited sources. This is source research, not lab validation. Check the stated versions and your own requirements before making changes.

mount: /data: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error. is a catch-all. It is printed when the kernel rejects the mount request as invalid, and it names several possible causes at once. The superblock is only one of them, and often the least likely. Check that the device is the right one, what it holds, whether the type and options fit it, and what the kernel log says, in that order.

What the error means

The text comes from the util-linux source code (release v2.38.1), not from a manual page. In file libmount/src/context_mount.c, mount builds this message when the mount call returns the error code for an invalid argument and the request was not a remount, a failed change of mount flags, a move under a shared mount, or a network filesystem. The source has it as the format "wrong fs type, bad option, bad superblock on %s, missing codepage or helper program, or other error", where %s is the device name. In sys-utils/mount.c mount prints it with the format "%s: %s.", where the first %s is the mount target (or the source if there is no target) and the second is the message, as in the line at the top.

For a network filesystem (NFS, CIFS) the same error code gives a different text in the same file: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount.<type> helper program, where <type> stands for the filesystem type.

If the system call failed, mount then prints the line dmesg(1) may have more information after failed mount system call. The kernel log is where the filesystem driver explains its refusal, so read it before changing anything.

The mount manual explains the helpers. For types such as nfs and cifs, "mount will execute the program /sbin/mount.type (if that exists)". The mount.nfs manual says it is "part of nfs(5) utilities package". The mount.cifs manual says "This tool is part of the cifs-utils suite."

When no -t is given, mount "uses the libblkid(3) library for guessing the filesystem type". If libblkid finds nothing, mount tries the types in /etc/filesystems or /proc/filesystems. Naming a type the kernel does not have gives a different text in the same source file, unknown filesystem type '%s', where %s is the type you named, so that is a separate fault from this one.

Likely causes

Cause What you see How to confirm
Wrong device (the whole disk instead of its partition, or the wrong partition) blkid on the device shows no filesystem type, while a partition of it does lsblk --fs lists the partitions and their types
No filesystem on the device blkid prints nothing and exits with status 2 blkid and blkid --probe give no type
-t names a type different from what is on the device The type in the command or in /etc/fstab differs from blkid Compare the two
No -t given and libblkid finds nothing it knows mount tries the types in /etc/filesystems or /proc/filesystems and none fits blkid prints no type; read /proc/filesystems
An option does not suit the type Mount works without the option Remove options one at a time; check the mount manual's list for that type
NFS or CIFS helper missing The bad option; ... helper program text Check that /sbin/mount.nfs or /sbin/mount.cifs exists
Damaged superblock or metadata dmesg reports a read or superblock fault; e2fsck -n reports errors dmesg, then a read-only check

Prove the cause before changing anything

All of these commands only read.

1. What the system sees on the disk.

lsblk --fs

The lsblk manual says -f ("--fs") outputs "info about filesystems". Confirm that the device you passed to mount is the partition that carries a filesystem type, not its parent disk.

2. What libblkid finds on the device.

blkid /dev/sdb1
blkid --probe /dev/sdb1

blkid "can determine the type of content (e.g., filesystem or swap) that a block device holds". Its exit status is 2 if the device could not be identified, and 8 if the low-level probe (--probe) found an ambivalent result, meaning more than one signature. The blkid manual says to use wipefs for a detailed overview of such a device. A good result is one clear type that matches what you meant to mount.

3. The kernel log.

dmesg --level=err,warn

Read the lines at the time of the failed mount. The reason from the filesystem driver is the most precise clue.

4. Types the kernel offers.

cat /proc/filesystems

The mount manual says mount reads this file when it has to guess a type.

5. The mount table file. If the mount comes from /etc/fstab, check the file:

findmnt --verify

The findmnt manual says --verify checks "mount table content" and by default verifies "/etc/fstab parsability and usability".

6. Network helpers. For NFS or CIFS, check that /sbin/mount.nfs or /sbin/mount.cifs exists.

7. A read-only filesystem check, for ext2, ext3 and ext4 only.

e2fsck -n /dev/sdb1

The e2fsck manual says -n opens the filesystem read-only and answers no to every question. Run it only on a device that is not mounted. The manual also says that results on a mounted filesystem are not valid. The exit code is a sum: 0 means no errors, 4 means errors left uncorrected, 8 means an operational error.

Fix

Wrong device or wrong type

Use the partition that lsblk --fs shows with a type, leave out -t so mount can guess from the content, or pass the type that blkid reports. None of that changes the server's files.

Missing NFS or CIFS helper

The manuals name the suites that carry the helpers: the NFS utilities package for /sbin/mount.nfs and cifs-utils for /sbin/mount.cifs. First record whether the helper files exist now, in a file:

ls -l /sbin/mount.nfs /sbin/mount.cifs > /root/helpers-before-2026-11-22.txt 2>&1

Risk: the next step installs software on the server, and that adds files and may add services your change process has not approved.

Install the package that your distribution provides for that suite, with your distribution's package manager, in a maintenance window if the server is in production.

To back out, read /root/helpers-before-2026-11-22.txt first. Only if it shows that the helper was absent before the install, remove the package you just installed with the package manager, and no other package.

No filesystem on the device

Stop here. If blkid prints nothing and the disk is supposed to hold data, the filesystem may have been erased, or the device may be a member of a RAID set or volume group. Creating a new filesystem would destroy what is left. Find out what the disk was used for, and restore from backup if needed. For a new disk that was never formatted, the guide titled "New disk added to a Linux VM on VMware but it does not appear: rescan the SCSI host first" covers adding a disk.

A bad option in /etc/fstab

First save the current file, and record whether /data is mounted now (an empty output file means it is not):

cp -p /etc/fstab /etc/fstab.2026-11-22
findmnt --kernel /data > /root/findmnt-data-before-2026-11-22.txt

Risk: the next edit changes a mount line that the server reads at boot, the mount command after it mounts the filesystem on /data, and a wrong line can leave the server waiting for a device at the next start. The mount manual says the nofail option means "Do not report errors for this device if it does not exist".

Edit the line for the filesystem so the type and options match what blkid and the mount manual show for that type. Check the file, then test one mount by its mount point:

findmnt --verify
mount /data

To undo it, put the saved file back under its own name and check it:

cp -p /etc/fstab.2026-11-22 /etc/fstab
findmnt --verify

If the saved output shows that /data was not mounted before the test, and findmnt --kernel /data now shows it mounted, unmount it:

umount /data

If the saved output shows /data was already mounted, leave it mounted.

A test mount, read-only

When the cause is still unclear and blkid reports ext3 or ext4, a read-only mount shows whether the data is reachable. The ro,noload options below are the mount manual's advice for ext3 and ext4 only. First print the current mounts:

findmnt > /root/findmnt-before-2026-11-22.txt

Risk: the next command mounts the filesystem on an existing empty directory. For ext3 and ext4 the mount manual warns that "the system may still write to the device", because the journal is replayed if the filesystem is dirty, and it advises the ro,noload options to prevent that.

mount -t ext4 -o ro,noload /dev/sdb1 /mnt/check

To undo it, unmount the same directory:

umount /mnt/check

Damaged superblock

If dmesg and e2fsck -n point to damage, do not repair in place. Copy the device first; the guide titled "A failing disk in a Linux server: image it before you repair it" explains imaging. The e2fsck manual says -b superblock uses an alternative superblock "normally used when the primary superblock has been corrupted", and that backup superblock locations can be found with mke2fs -n using arguments "consistent with the file system's layout". The guide titled "UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY" at boot: what to do first on an ext4 server covers the repair steps with an undo file.

Example (illustrative): On web01, an administrator attaches a second disk and runs mount /dev/sdb /data. mount prints mount: /data: wrong fs type, bad option, bad superblock on /dev/sdb, missing codepage or helper program, or other error. lsblk --fs shows sdb1 with the type ext4 and no type on sdb. The administrator ran mount on the whole disk. mount /dev/sdb1 /data succeeds, and dmesg has no errors.

Confirm the fix

  1. mount returns no message, and findmnt --kernel /data lists the filesystem.
  2. dmesg --level=err,warn shows no new filesystem errors at the time of the mount.
  3. After a reboot, the filesystem mounts from /etc/fstab; findmnt --verify reports no problem with the file.
  4. Files you expect can be read.

What to watch afterwards

  • Kernel messages naming the same device, especially read errors, which can point to the disk and not the filesystem.
  • Use UUIDs or labels, which blkid prints, in /etc/fstab; findmnt --verify checks the file.
  • Do not mount a copy of a disk beside its original without checking duplicate identifiers; the guide titled "XFS 'Filesystem has duplicate UUID ... can't mount' on a snapshot or restored disk" explains the case.

Risks and limits

  • These commands have not been run or lab-tested.
  • The message text is taken from the util-linux v2.38.1 source code; other releases can print differently.
  • e2fsck applies to ext2, ext3 and ext4 only. Other filesystems have their own tools.
  • Never run a repair on a mounted filesystem, and never create a new filesystem on a device whose contents you need.

Sources

  • mount(8) — util-linux 2.38.1 manual page, Debian bookworm, source dated 2024-11-21, accessed 22 November 2026
  • blkid(8) — util-linux 2.38.1 manual page, Debian bookworm, source dated 2024-11-21, accessed 22 November 2026
  • lsblk(8) — util-linux 2.38.1 manual page, Debian bookworm, source dated 2024-11-21, accessed 22 November 2026
  • findmnt(8) — util-linux 2.38.1 manual page, Debian bookworm, source dated 2024-11-21, accessed 22 November 2026
  • dmesg(1) — util-linux 2.38.1 manual page, Debian bookworm, source dated 2024-11-21, accessed 22 November 2026
  • e2fsck(8) — e2fsprogs manual page, Debian bookworm, source dated 2023-03-05, accessed 22 November 2026
  • mount.nfs(8) — nfs-utils manual page, Debian bookworm, source dated 2024-12-11, accessed 22 November 2026
  • mount.cifs(8) — cifs-utils manual page, Debian bookworm, source dated 2022-08-26, accessed 22 November 2026
  • context_mount.c at tag v2.38.1 — util-linux project source code, GitHub release tag v2.38.1, no date shown, accessed 22 November 2026
  • mount.c at tag v2.38.1 — util-linux project source code, GitHub release tag v2.38.1, no date shown, accessed 22 November 2026