Wrong fs type, bad option, bad superblock on /dev/sdaX

Jordi Huertas

I am trying to create an automated mount for an external hard drive, but it keeps failing. I am a little newbiew at linux.

I have googled and searched in StackExchange and I tried a lot of things, but I did not find a solution for my problem.

OS: Raspbian Stretch

Those are the steps I did:

Format external drive to ext4

sudo mkfs.ext4 /dev/sda1 -L hdd_moc
mke2fs 1.43.4 (31-Jan-2017)
/dev/sda1 contains a ext4 file system labelled 'hdd_owncloud'
    last mounted on Mon Feb 12 09:34:38 2018
Proceed anyway? (y,N) y
Creating filesystem with 244181760 4k blocks and 61046784 inodes
Filesystem UUID: b9b47e44-db76-40de-a0ed-940c9699799a
Superblock backups stored on blocks:
    32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
    4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
    102400000, 214990848

Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done   

Create directory for mounted external usb drive

sudo mkdir /mnt/hdd_moc

Create the www-data user to the group

sudo groupadd www-data
sudo usermod -a -G www-data www-data

Give permissions

sudo chown -R www-data:www-data /mnt/hdd_moc
sudo chmod -R 775 /mnt/hdd_moc
ls -l /mnt
total 4
drwxrwxr-x 2 www-data www-data 4096 Feb 12 10:06 hdd_moc

Get the gid, uid and uuid

id -g www-data
33
id -u www-data
33
ls -l /dev/disk/by-uuid
total 0
lrwxrwxrwx 1 root root 15 Feb 12 09:49 9a7608bd-5bff-4dfc-ac1d-63a956744162 -> ../../mmcblk0p2
lrwxrwxrwx 1 root root 15 Feb 12 09:49 B60A-B262 -> ../../mmcblk0p1
lrwxrwxrwx 1 root root 10 Feb 12 10:12 b9b47e44-db76-40de-a0ed-940c9699799a -> ../../sda1

Give the instruction to fstab

sudo nano /etc/fstab

proc            /proc           proc    defaults          0       0
PARTUUID=ed7ab5b3-01  /boot           vfat    defaults          0       2
PARTUUID=ed7ab5b3-02  /               ext4    defaults,noatime  0       1
UUID=b9b47e44-db76-40de-a0ed-940c9699799a /mnt/hdd_moc auto nofail,uid=33,gid=33,umask=0027,dmask=0027,noatime 0 0

Automated mount test

sudo mount -a
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
   missing codepage or helper program, or other error

   In some cases useful info is found in syslog - try
   dmesg | tail or so.

Normal mount test

sudo mount /dev/sda1 /mnt/hdd_moc -> It works, I can do a "ls".

So I think my problem is in the 4th line of fstab. I readed fstab info but I can not understand what I should do. (https://wiki.debian.org/fstab)

Thank you :)

dr_

You're overcomplicating things. The fact that the command

sudo mount /dev/sda1 /mnt/hdd_moc

works correctly shows you that your system is able to mount a ext4 filesystem without specific options. In fact, ext4 is one of the most common fs for Linux (if not the most one).

The mount options you're trying to use don't exist for ext4 fs. All you need to do is to rewrite the relevant /etc/fstab line as such:

UUID=b9b47e44-db76-40de-a0ed-940c9699799a  /mnt/hdd_moc  ext4  defaults,nofail,noatime  0 0

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

mount: wrong fs type, bad option, bad superblock

From Dev

Why do I get "wrong fs type, bad option, bad superblock" error?

From Dev

mount: wrong fs type, bad option, bad superblock on /dev/sdb on CentOS 6.0

From Dev

Why do I get "wrong fs type, bad option, bad superblock" error?

From Dev

mount: wrong fs type, bad option, bad superblock on /dev/sdb on CentOS 6.0

From Dev

NFS does not work. mount: wrong fs type, bad option, bad superblock

From Dev

Cannot mount USB drive with "wrong fs type, bad option, bad superblock" error message

From Dev

Cannot mount dislocker-file loop: wrong fs type, bad option, bad superblock

From Dev

NTFS filesystem on external drive isn't recognised: "mount: wrong fs type, bad option, bad superblock on /dev/sdb1"

From Dev

NTFS filesystem on external drive isn't recognised: "mount: wrong fs type, bad option, bad superblock on /dev/sdb1"

From Dev

Unable to Mount RAID1 md0 - wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error

From Dev

mount: /new_root: wrong fs type, bad superblock on /dev/nvme0n1p4, missing codepage or helper program, or other error

From Dev

mount: /new_root: wrong fs type, bad superblock on /dev/nvme0n1p4, missing codepage or helper program, or other error

From Dev

FAT filesystem - bad superblock

From Dev

bad magic number in superblock

From Dev

Bad magic number in superblock external HDD

From Dev

Bad configuration option: ServerAliveInterval

From Dev

bad configuration option in git

From Dev

Linux - new hard drive, bad magic number in superblock

From Dev

enable to mount /dev/centos/home after lvresize, bad superblock

From Dev

Bad receiver type iOS

From Dev

Bad operand type

From Dev

Is an empty type bad design?

From Dev

ssh - Bad configuration option: KeyAlgorithms

From Dev

NVME Disk failure causing boot partition corruption, bad-superblock error

From Dev

bad operand type for abs(): 'list'

From Dev

bad return type in lambda expression

From Dev

IllegalArgumentException: Bad stream type 21

From Dev

Bad type on the operand stack in arraylength

Related Related

  1. 1

    mount: wrong fs type, bad option, bad superblock

  2. 2

    Why do I get "wrong fs type, bad option, bad superblock" error?

  3. 3

    mount: wrong fs type, bad option, bad superblock on /dev/sdb on CentOS 6.0

  4. 4

    Why do I get "wrong fs type, bad option, bad superblock" error?

  5. 5

    mount: wrong fs type, bad option, bad superblock on /dev/sdb on CentOS 6.0

  6. 6

    NFS does not work. mount: wrong fs type, bad option, bad superblock

  7. 7

    Cannot mount USB drive with "wrong fs type, bad option, bad superblock" error message

  8. 8

    Cannot mount dislocker-file loop: wrong fs type, bad option, bad superblock

  9. 9

    NTFS filesystem on external drive isn't recognised: "mount: wrong fs type, bad option, bad superblock on /dev/sdb1"

  10. 10

    NTFS filesystem on external drive isn't recognised: "mount: wrong fs type, bad option, bad superblock on /dev/sdb1"

  11. 11

    Unable to Mount RAID1 md0 - wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or helper program, or other error

  12. 12

    mount: /new_root: wrong fs type, bad superblock on /dev/nvme0n1p4, missing codepage or helper program, or other error

  13. 13

    mount: /new_root: wrong fs type, bad superblock on /dev/nvme0n1p4, missing codepage or helper program, or other error

  14. 14

    FAT filesystem - bad superblock

  15. 15

    bad magic number in superblock

  16. 16

    Bad magic number in superblock external HDD

  17. 17

    Bad configuration option: ServerAliveInterval

  18. 18

    bad configuration option in git

  19. 19

    Linux - new hard drive, bad magic number in superblock

  20. 20

    enable to mount /dev/centos/home after lvresize, bad superblock

  21. 21

    Bad receiver type iOS

  22. 22

    Bad operand type

  23. 23

    Is an empty type bad design?

  24. 24

    ssh - Bad configuration option: KeyAlgorithms

  25. 25

    NVME Disk failure causing boot partition corruption, bad-superblock error

  26. 26

    bad operand type for abs(): 'list'

  27. 27

    bad return type in lambda expression

  28. 28

    IllegalArgumentException: Bad stream type 21

  29. 29

    Bad type on the operand stack in arraylength

HotTag

Archive