ucrbuffalo
Posts: 2
Joined: Sat Jun 13, 2020 7:21 pm

Unable to mount USB drive: "wrong fs type"

Sat Jun 13, 2020 7:30 pm

I have been trying to get my USB mounted so I can use it for an SMB share, but keep running into this issue every time. I have formatted the drive to ext4 and when I use

Code: Select all

sudo fdisk -l
I get this result for my drive:

Code: Select all

Disk /dev/sda: 58.8 GiB, 63065554944 bytes, 123174912 sectors
Disk model: Cruzer Fit      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2214CEF2-8830-5A40-AF74-E30CBA5AA291

Device     Start       End   Sectors  Size Type
/dev/sda1   2048 123174878 123172831 58.8G Linux filesystem
Next I made a directory in the pi user's folder

Code: Select all

mkdir /home/pi/ps2smb
Then I ran

Code: Select all

sudo mount /dev/sda1 ps2smb -o umask=000
This is the point where I am stuck. I don't understand what is wrong with the fs type.

fbe
Posts: 649
Joined: Thu Aug 17, 2017 9:08 pm

Re: Unable to mount USB drive: "wrong fs type"

Sat Jun 13, 2020 8:52 pm

The whole error message is:

Code: Select all

mount: /home/pi/ps2smb: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, or other error.
You must not use the option "umask=000" when mounting a Linux filesystem.

Code: Select all

sudo mount /dev/sda1 /home/pi/ps2smb
should work.

User avatar
thagrol
Posts: 3747
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Unable to mount USB drive: "wrong fs type"

Sat Jun 13, 2020 10:32 pm

As fbe pointed "umask" isn't a valid option for many linux filesystems.

If the optionless mount suggested doesn't work it's unlikely anyone will be able to help further without knowing which "linux filesystem" it actually is. There are many and not all are installed/supported out of the box (i.e. you have to install them).

To find out which you have, try:

Code: Select all

 blkid -o value -s TYPE /dev/sda1
Once you have that, read the "Filesystem Independent Mount Options" section of the man page for mount and the "Mount options for ..." for the relevant filesystem.

You can get the docc by

Code: Select all

man mount
Given your umask option, I'm guessing you want to force full read/write permissions to everyone on that partition all the time, regardless of who created or owns the file/directory.

With the linux/unix security model that's not going to be possible. You can do a recursive chmod a+rwx on the mount point after mounting but any new files or directories will have the default permissions of the person who created them along with that person as the owner and their primary group.

Read up on the linux/unix security model for more info.

The umask option exists for some non-linux filesystem that have no concept of owner, group, and world permissions (or owner and group for that matter) e.g. FAT and some that have some of those concepts but not in a way that can be easily mapped.
Arguing with strangers on the internet since 1993.

ucrbuffalo
Posts: 2
Joined: Sat Jun 13, 2020 7:21 pm

Re: Unable to mount USB drive: "wrong fs type"

Sun Jun 14, 2020 11:38 pm

The umask option exists for some non-linux filesystem that have no concept of owner, group, and world permissions (or owner and group for that matter) e.g. FAT and some that have some of those concepts but not in a way that can be easily mapped.
Oh that makes more sense then. I guess I didn't realize that part. Not using a umask didn't work for me at first either, but I realized that what I wanted to do might not work in Raspbian Lite and switched to full. I followed a very helpful tutorial where I understood 99% of what he was talking about, but didn't realize that's how to do it. I instead mounted the drive in /mnt/usb1 (which I should have thought to do in the first place). The tutorial showed me which step I had missed in the first place which was sudo mkfs -t ext4 /dev/sda1 (I thought I had done this step, but hadn't).

Thanks for pointing me in the right direction!

Return to “Troubleshooting”