USB drive mount fails in 12.2?

I have a Samsung cell phone (T404g) which (with an SD chip installed) can be used as a USB drive. On my laptop, with an older version of SuSE installed (11.0, I think), I can do a “mount -t vfat /dev/sdb /media/drive” to mount it and copy files to & from. However, when I plug the cable into my tower machine running SuSE 12.2, that mount command fails. I can, however, do a “mount -t vfat /dev/sdb1 /media/drive” and mount something.

However, the mounted directory no longer has my files! It instead has some empty directories (“Images”, “Sounds”, etc) that were created by the phone’s OS. Yet when I unmount it and remount on the laptop, the files are there (but the phone OS dirs aren’t). It also appears to be read-only: I can’t change the permissions to allow copying to the device.

Any suggestions on what to do to get this to work in a consistent fashion across machines?

So, with the phone plugged in, why not open up a terminal session and type in the following command:

su -
fdisk -l

You can post the results here in a message using a code # field from an advance message editor. Your explicit command suggests it will be drive /dev/sdb, but that may not be so.

Thank You,

Duh! That solves half the problem - I had another thumb drive plugged in to a port on the laptop :frowning: That was getting mounted when I did the /dev/sdb mount. (The qestion, though, is why /var/log/messages showed that it was connecting /dev/sdb when I plugged in the phone. I would have thought it would be /dev/sdc, with the thumb drive picked up as /dev/sdb on boot.)

Now I’ve got a new problem. On the laptop (older SuSE version), I have directories set up under /media for thumb drives &c (e.g. /media/td for vfat drives, /media/ext for Linux formated things…) Today (the first time I’ve used mountable drives on it) I created the same directories on the new machine. Shut down, came back and rebooted just now, and all those directories are gone.

You should not yourself change anything inside /media. It is a tmpfs file system and thus deleted on shutdown of the systm. /media is only for dynamic mounts on behalf of the desktop (what people call “automounting when I sit at he desktop and connect an USB device”).

When you want to mount yourself you should use another mountpoint outside /media (when you can not imagine some logical place where it should be, then go for something inside /mnt). When this is about a device that you connect regularly, then make an entry in /etc/fstab for it and add the noauto mount option. this is advisable because:

  1. the above mentioned desktop mounting will not take place (allthough there seems to be a bug around in 12.3);
  2. you can specify a mount using id, UUID or Label, that is needed to facilitate 1) above and it will also identify your device regardless if it becomes /dev/sdc or /dev/sdf or whatever.
  3. you can specify all the options and the mountpoint in the fstab entry and thus keep the mount command you do later as short as possible.

This has been described before. The cuprit is usb-mode-switching. That tries to use the phone as a modem IIRC. To avoid this, edit /etc/usb_modeswitch.conf, and change


DisableSwitching=0

to


DisableSwitching=1

Reconnect the phone, and you should be able to mount the device.

(Sigh) I really love it when the designers change things like this on me. For years /media was the place you created device mount points, now it goes away and I have to get used to doing it somewhere else, and doing it differently on different machines.

Anyway, thanks for the help. Sure wish this forum had a decent search feature!

They will probably argue that it you should never have done that. I know pretty sure that you could have borked things there also in the old situatiion because there were then two who thought that they could create/delete mountpoints there at their own will.

Wkipidia says that the FSH says about /media:

Mount points for removable media such as CD-ROMs (appeared in FHS-2.3).

which might in itself not be enough to sstop you using it for your own mounts. But OTOH there are so many places to mount storage, why do people end up in /media?

And about /mnt:

Temporarily mounted filesystems.

Which to me looks a bit more appropriate.

But YYMV.

On 2013-03-05 20:56, jamesqf wrote:

> (Sigh) I really love it when the designers change things like this on
> me. For years /media was the place you created device mount points, now
> it goes away and I have to get used to doing it somewhere else, and
> doing it differently on different machines.

And for years I have been telling people not to mount anything yourself
in /media, to leave it alone. It is your fault for using it, instead of
/mnt which is the place designed for doing those things.

>;-)


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

Not to start an argument or anything, but maybe it’s because when the documentation SAYS it’s supposed to be for mount points for removable media, then that’s where you tend to put the mount points for your removable media?

And how else would I (a person who uses Linux as Unix, rather than as a Windoze-clone “desktop”) handle removable media except by mounting it when & where I want to use it?

Let me say it is a problem for automounting to work properly if the folder it is set to use is already in use. There are decisions made by the developers of openSUSE which puts a few limits on what we are allowed to do. Consider you can create as many other folder names as you wish from root and mount anything on them you wish, manually on demand, or automatically through the fstab file at boot time. I do not think it is unreasonable to have a few limits on what we can do and like most things, its a learning curve on the use of any Linux distribution. Your choices are to learn to live with it and carry on, complain about it in the correct forum, make a new proposal in openFATE, file a bug report if you think it is not right or find a different distribution that better matches how you think. Its hard to believe that say Linux Mint or Ubuntu would not also include some detail you do not like. For me, its learn all you can about openSUSE and make it work for you and learn from your mistakes. I can guarantee we all have done things we find out later was wrong and also learn something new and helpful about using openSUSE almost everyday. So I say, now you know, time to move on and use openSUSE in your new found way of doing things.

Thank You for using openSUSE,

On 2013-03-06 03:56, jamesqf wrote:
> Not to start an argument or anything, but maybe it’s because when the
> documentation SAYS it’s supposed to be for mount points for removable
> media, then that’s where you tend to put the mount points for your
> removable media?

It was for automatic mounting, that has always been known. The point for
manual mounts was /mnt. Nothing new.

That not everybody knew this, that it was not clearly documented…
possibly. Linux user documentation always lags.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))

I wouldn’t disagree. But suppose you don’t use Windoze any oftener than you can possibly avoid, and so don’t think of automounting as something that can or should be done with Linux?

Nor is it entirely unheard of for one useful filesystem to be replaced by another. Consider the more-or-less replacement of /proc with /sys, for instance. So when the developers don’t clearly communicate their intentions, it’s easy for us users to misinterpret them. As you say, it’s a learning experience: I still haven’t found any concise explanation of /sys, for instance, and so have had to figure out things piecemeal…

On 2013-03-06 20:36, jamesqf wrote:
> So when the developers don’t clearly communicate their
> intentions, it’s easy for us users to misinterpret them.

That’s is true. As I said, Linux user documentation always lags.


Cheers / Saludos,

Carlos E. R.
(from 11.4, with Evergreen, x86_64 “Celadon” (Minas Tirith))