What the message looks like
$ sudo mount /dev/sdb1 /mnt/data
mount: /mnt/data: wrong fs type, bad option, bad superblock on /dev/sdb1, missing codepage or helper program, or other error.Common causes
- The helper for this filesystem is missing:
nfs-commonfor NFS,cifs-utilsfor SMB,ntfs-3gorexfatprogsfor NTFS and exFAT. - The device has no filesystem yet, or a different type than you gave, or you mounted the disk instead of its partition.
- A bad option or a typo in
/etc/fstab. - The filesystem is damaged or was not shut down cleanly.
- The device name changed after a reboot, so the line points to the wrong disk.
Check
- What does the device contain?
lsblk -f - Why did the kernel refuse? Read the last lines
- Type and UUID of the partition
sudo blkid /dev/sdb1 - Does fstab look valid?
findmnt --verify
Fix
- Read the kernel log first, it often says the exact reason.
- Install the missing helper for the filesystem and mount again, for example
sudo apt install nfs-common,cifs-utilsorntfs-3g. - Mount the right device with the right type:
sudo mount -t ext4 /dev/sdb1 /mnt/data. In fstab useUUID=instead of/dev/sdX, then test withsudo mount -a. - If it looks damaged, check it read-only first while unmounted:
sudo fsck -n /dev/sdb1. Repair withfsckonly after a backup. A repair can change or remove data. - If
blkidshows nothing, the disk has no filesystem. Creating one withmkfserases everything on it. Do it only on a disk you are sure is empty.
FAQ
Is my data gone?
Not necessarily. The message is generic. Do not run mkfs or a repair before you know the cause and have a copy, for example an image made with dd on another disk.
Why does it fail only at boot?
A wrong line in /etc/fstab or a disk that is not ready. Add nofail for non-essential disks so the boot does not stop.