Problem mounting flash drive on Raspberry Pi

Hello everybody!

I own a Raspberry Pi B, on which I recently installed opensuse 13.1 following these intructions.
System is up and running headlessly via SSH, no issues there.

The problems start as soon as I want to mount my USB flash drive, which contains a single NTFS partition. (ntfs-3g and ntfsutils are installed)

# ntfs-3g /dev/sda1 /mnt/sda1
Mount is denied because the NTFS volume is already exclusively opened.
The volume may be already mounted, or another software may use it which
could be identified for example by the help of the 'fuser' command.

Same output for mount. Additionally, fuser does not work on my system, maybe it’s part of a package I do not have yet?

When I try to unmount:

# umount /dev/sda1
umount: /mnt/sda1: not mounted

Does anybody know what seems to be the problem there?

What I noticed is that, though my fstab is rather short, mount shows quite a lot:

# cat /etc/fstab
devpts /dev/pts devpts mode=0620,gid=5 0 0
proc   /proc    proc   defaults        0 0
# mount
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
devpts on /dev/pts type devpts (rw,mode=0620,gid=5)
proc on /proc type proc (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
/dev/sda1 on /mnt/sda1 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
mqueue on /dev/mqueue type mqueue (rw)
debugfs on /sys/kernel/debug type debugfs (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run/lock on /var/lock type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
debugfs on /sys/kernel/debug type debugfs (rw)
mqueue on /dev/mqueue type mqueue (rw)
configfs on /sys/kernel/config type configfs (rw)
/run on /var/run type none (rw,bind)
/run on /var/run type none (rw,bind)
fusectl on /sys/fs/fuse/connections type fusectl (rw)

Thank you for your help! :slight_smile:

Did you manually navigate to /mnt/sd1 and see if there’s anything there?

If the system automatically mounted the drive, it may be at /var/run/media/“your user name”/

But I would think that the umount command should have worked in that case.

fstab does not generally contain info for removable drives. You could manually add a line for the flash drive as long as the system will always see it as /dev/sda1

You could unplug and re-plug the device after a couple of seconds, then check the output of dmesg to see any system messages concerning it.

I have openSUSE 13.1 with full graphics running on a Raspi-B model, albeit quite slowly. If I get a chance this weekend, I’ll try to mount an NTFS flash drive and see what happens. I’ll post back.

Okay, I tried everythink you suggested (as root):

/mnt/sda1 is empty

# dir /mnt/sda1/

total 0

/var/run/media/ does not even exist

If I add the line

/dev/sda1 /mnt/sda1 ntfs-3g defaults 0 0

in fstab, the system does not seem to be able to boot properly. I could not connect via SSH

# ssh -p 1558 192.168.0.12
ssh: connect to host 192.168.0.12 port 1558: No route to host

so I hooked up the Pi and my old TV and all I get to see is Linux trying to mount the Partition, failing to do so and then entering “Emergency Mode”.

dmesg shows

  532.153218] usb 1-1.2: new high-speed USB device number 4 using dwc_otg
  532.254729] usb 1-1.2: New USB device found, idVendor=0781, idProduct=5567
  532.254765] usb 1-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
  532.254781] usb 1-1.2: Product: Cruzer Blade
  532.254797] usb 1-1.2: Manufacturer: SanDisk
  532.254812] usb 1-1.2: SerialNumber: 200443169218E7A039DC
  532.257872] usb-storage 1-1.2:1.0: USB Mass Storage device detected
  532.283664] scsi0 : usb-storage 1-1.2:1.0
  533.284880] scsi 0:0:0:0: Direct-Access     SanDisk  Cruzer Blade     1.03 PQ: 0 ANSI: 2
  533.288672] sd 0:0:0:0: [sda] 15633408 512-byte logical blocks: (8.00 GB/7.45 GiB)
  533.290301] sd 0:0:0:0: [sda] Write Protect is off
  533.290345] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
  533.291391] sd 0:0:0:0: [sda] No Caching mode page found
  533.291425] sd 0:0:0:0: [sda] Assuming drive cache: write through
  533.306652] sd 0:0:0:0: [sda] No Caching mode page found
  533.306694] sd 0:0:0:0: [sda] Assuming drive cache: write through
  533.311351]  sda: sda1
  533.318013] sd 0:0:0:0: [sda] No Caching mode page found
  533.318055] sd 0:0:0:0: [sda] Assuming drive cache: write through
  533.318081] sd 0:0:0:0: [sda] Attached SCSI removable disk

Looks okay to me.

However, I found that, even after unplugging the drive and rebooting, mount returns (deleted other lines):

# mount
...]
/dev/sda1 on /mnt/sda1 type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
...]

That should not be there if it isn’t even attached, right?

I have no idea what to do here anymore.

Thank you for your help so far! :):good:

Yes, with the drive not connected, the mount command should not show it. Not sure what’s going on there. If the drive is not connected, it should be safe to remove the /mnt/sda1/ folder if it exists.

On my Pi, I have fuse installed and my NTFS flash drive was auto-mounted at /run/media/“My User Name” as soon as I plugged it in. (apparently the mount location varies between ARM and x86_64 architectures) All files displayed correctly and I wrote two files to the drive just to make sure it worked. In your earlier post, your “mount” command returned something about “fuseblk” in the line concerning your flash drive. It may be possible that fuse will be required?

You could go to software.opensuse.org and use the dropdown menu at the top of the page to search for ARM versions of fuse, but auto-install from that site would require Yast, which is extremely slow on my Raspi. If you download only the fuse package from there, I fear you might be bombarded with unsatisfied per-requsites from zypper. Here is the exported repository from my zypper that had the fuse package:


[openSUSE-13.1-repo-oss]
name=openSUSE-13.1-repo-oss
enabled=1
autorefresh=1
baseurl=http://download.opensuse.org/ports/armv6hl/distribution/13.1/repo/oss/
type=yast2
keeppackages=0

You should be able to add the repository and then “zypper refresh” “zypper install fuse”, and all necessary packages should be found.

Here is the output of “mount” on my Raspi concerning my flash drive:


/dev/sdb1 on /run/media/ronnie/2GIG type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)

I hope it helps.