I installed OpenSuse 42.2 (with btrfs) on one of my machines, which I use to store my audio library. I just bought a new player (SanDisk Clip Sport), and want to transfer the files to it. However, mounting seems to have drastically changed since 13.2. There I would just have a mount point in /etc/fstab, e.g.
and give the command “mount /media/FlashDisk”.In 42.2, the format of fstab has changed. Each line (most of which don’t seem to relate to actual devices :-() is prefixed by “UUID=long_hex_string”. I don’t see /var/log/messages any more (I sort of understand that), the journalctl command doesn’t seem to show where the device is (it’d be sdb1 on 13.2). dmesg shows that the device is recognized.So I’m lost. How do I mount this device? (And other USB things in the future?)FYI, I do everything purely from the command line. No desktop, no file managers…PS: What is wrong with the editor here? All my paragraphs go away…
Many people who are using a full Desktop (like Gnome or KDE) would probably use a File Manager (like Dolphin) which will mount discovered USB devices.
Compared to 13.1, yes systemd is not far more capable and now might mount removable devices which are currently discovered by udev.
But, I would think that <if> the removable storage is discovered in time, you can also mount in the fstab. Maybe you need to try a lazy mount? I’d have to either search for the specific post in these forums a few years ago that covered this fairly extensively if that is what you want to do…
System messages are no longer stored in text files, they are stored in a database called the journal. You can either read the journalctl man pages or probably better is to skim any of the many articles and guides people have created that describe how to find things using the journalctl command.
You can still use as pointer to the device things like /dev.sdb1. That other ways of identifying the device are also in use, does not mean that the old way dos not work anymore.
Off course you must be sure that /dev/sdb belongs to the device you mean and that there a partition with #1 on it, else .ther will not be /dev/sdb1 (or it may point to another device).
If it does automatically mount a device when I plug it in (it isn’t often going to be there at boot), how do I find out where it’s mounted? However, automounting is something that I would prefer not to happen. I want to mount the device when I issue the mount command, and have it unmounted when I issue umount.
But, I would think that the removable storage is discovered in time, you can also mount in the fstab. Maybe you need to try a lazy mount? I’d have to either search for the specific post in these forums a few years ago that covered this fairly extensively if that is what you want to do…
As I said, discovery by the system isn’t really an issue. I know when I plug it in. I’d love to mount in fstab (or rather, define the mount point there), but the syntax of the file has changed so I don’t know how to do it, or whether I can do it at all without messing up the system.I did of course try searching for relevant threads (and did a Google search) before posting this, but didn’t find anything.
Then adding an entry to /etc/fstab is the way to go. When such a mount exists here, it will be ignored by udisks2 (leaving you to mount manually). If you want to use mounting by UUID, an entry similar to the following can be used
As I said, discovery by the system isn’t really an issue. I know when I plug it in. I’d love to mount in fstab (or rather, define the mount point there), but the syntax of the file has changed so I don’t know how to do it, or whether I can do it at all without messing up the system.I did of course try searching for relevant threads (and did a Google search) before posting this, but didn’t find anything.
As Henk pointed out the same fstab entry should work in 42.2 as long as /dev/sdb1 points to the partition you want to mount.
Did you try using this approach?
My preferred way of checking what is what is to use:
So normal - AKA prior to 42.2 - fstab syntax will still work?
Did you try using this approach?
No, because I could just see the old syntax not being understood by the new OS, and terminally screwing up the system, requiring OS reinstall at a minimum. One of those “Been there, done that, don’t need another T-shirt” things…
—Ignore this, it’s the only way I can get a paragraph —
I have gotten it to work by hand now, with some limitations (like having to be root to write to the device). Also it finds the device as sdf or sdg, not sdb. Anyway, thanks to everyone for the help.
There is NO difference whatsoever between how fstab works in 42.2 or all versions before it. Compare
man fstab
between the levels if you want so.
When you have problems mounting something, then please show the mount statement and the eventual messages that follow it. Only then can we be of any help.
When you have permission problems on the file tree within a mounted file system then there are two possibilities:
It is NOT a Linux file system type, thus has no owners/groups and permissions, thus they are mimicked (faked, or what ever you want to call that) and mount options for those non-Linux file systems are there to influence that mimicking into a workable situation.
It is a Linux file system type and in that case it is of no importance if it is on a different file system or not: the normal Unix/Linux ownership and permissions rules govern.
In both cases, assessing what is wrong it of course enormous furthered by posting by what the owners and the permissions are of the files you have problems with
ls -l <file-name>
(and of the directories in the path leading to the files) instead of saying things like “having to be root to write to the device” which are just conclusions you jumped to.
If there is no difference, then why does the fstab on my 42.2 machine have every line prefixed by “UUID=long_hex_string”? That is not the case on my 13.2 machine, nor on any *nix machine that I’ve ever looked at.
When you have permission problems on the file tree within a mounted file system then there are two possibilities:
Or perhaps a third possibility: it seems that the users option can only be specified from within fstab.
That feature was not USED earlier (as default) by the openSUSE installer. That does NOT mean it did not exist earlier, nor does it mean that all other features (like using the /dev/sdNX directly) do not function anymore.
As I read you complaint, you say that you can not use the /dev/sdNX way of specifying the device anymore (which is NOT the case), you say that you see another way of specifying the device used now by openSUSE. Which may be true, but is not very interesting for your case.
It seems to me that you never ever took the trouble to study
man mount
and
man fstab
It is all there. In case you are still to lazy to look at it, this is an important (for your case) part of it man mount:
The device indication.
Most devices are indicated by a file name (of a block special device), like /dev/sda1, but there are other possibilities. For example, in the case of an NFS mount, device may look like knuth.cwi.nl:/dir. It is possible to indicate a block special device using its filesystem LABEL or UUID (see the -L and -U options below) and partition PARTUUID or PARTLABEL (partition identifiers are supported for GUID Partition Table (GPT) and MAC partition tables only).
The recommended setup is to use tags (e.g. LABEL=) rather than /dev/disk/by-{label,uuid,partuuid,partlabel} udev symlinks in the /etc/fstab file. The tags are more readable, robust and portable. The mount(8) command internally uses udev symlinks, so use the symlinks in /etc/fstab has no advantage over the tags. For more details see libblkid(3).
and from man fstab:
Instead of giving the device explicitly, one may indicate the filesystem that is to be mounted by its UUID or LABEL (cf. e2label(8) or xfs_admin(8)), writing LABEL= or UUID=, e.g., LABEL=Boot' or UUID=3e6be9de-8139-11d1-9106-a43f08d823a6’.
In short it says that there are three (3) ways to specify the device:
by using the device file (/dev/sdNX)
by using one of the symbolic links to the special device file created since ages (and used by opebSUSE as default in earlier versions) in the directories /dev/disk/by-label. /dev/disk/by-id, /dev/disk/by-path and /dev/disk/by-uuid
by using the construct UUID=, LABEL=, etc.
And you can choose from those three ways what fits you for each and every individual entry in fstab and for each and every individual mount
I have no idea what you mean with that. A file system is a Linux file system (in fact POSIX complying) or not. There is no third possibility.
users is a File System Independent Mount Option:
users
Allow every user to mount and unmount the filesystem. This option implies the options noexec, nosuid, and nodev (unless overridden by subsequent options, as in the option line users,exec,dev,suid).
This does not have ANYTHING to do with permissions to access files on the mounted file system. When this is specified in fstab, It makes it possible that any user can execute the mount command for that fstab entry. The result will be the same as when root executes the mount command. And it can of course only be in fstab and not added when using the mount command. The latter would mean that every user could (un)mount every file system at will.
Maybe instead of clinging to some conclusions you have come to by your experiences, you better try to reformulate your problem.
In your first post you show us an fstab entry (which looks fine, but it depends on that device being /dev/sdb1, which you do not prove). Then you say you give a command, but you do NOT show us that copied/pasted from the terminal, icluding the prompt, the command, the output (any error messages?) and the next prompt (and best something like mount | grep sdb1 before and after to show if something happened). Thus we have no idea if that succeeds or goes wrong or whatever. Instead you start talking about other entries in your fstab, which has nothing to do with your problem (if you have one).
The installer sets the style of mount points and seems to be a bit variable. Leap 42.2 didn’t use uuid’s on my machine. It used disk by id. Personally I think it would be best to use disk by label as labels can be the same when a storage device is changed but can uniquely identify disks.
The automount mounts to /run/media/* user name / *on 42.2. You can use this mount point in the console just like any other one. /media has been used in the past.
I missed one point on auto mounting usb. On KDE a panel pop’s up. Use the icon that is normally used for safe withdrawal before the other options and it sets mount for something else. There may be a need to click this so that the mount can be used from the console.
:(Not knowing this can cause some confusion if some one plugs something in and then changes their mind and wants to pull it out. Really there should be another main option.
And if you had just SAID that back in the beginning, that would have answered my question and we’d have saved a lot of back & forth messages.
As I read you complaint, you say that you can not use the /dev/sdNX way of specifying the device anymore…
No, my complaint is that something basic to the system changed without any obvious warning, and I didn’t want to take the chance of messing up my system through ignorance. Since was unable to find out why through the usual sources such as Google (I freely admit Google and I don’t get along that well), I though to ask someone more knowledgable. I’m sorry if my ignorance upsets you.[/QUOTE]It seems to me that you never ever took the trouble to study
man mount
and
man fstab
It is all there. In case you are still to lazy to look at it, this is an important (for your case) part of it man mount:[/QUOTE]It may seem that way, but in fact I did study mount and fstab, probably sometime back in the early '90s (if not before). This is *nix, not Windoze: it’s not supposed to change just for the heck of it.
And if you had just SAID that back in the beginning, that would have answered my question and we’d have saved a lot of back & forth messages.
As I read you complaint, you say that you can not use the /dev/sdNX way of specifying the device anymore…
No, my complaint is that something basic to the system changed without any obvious warning, and I didn’t want to take the chance of messing up my system through ignorance. Since was unable to find out why through the usual sources such as Google (I freely admit Google and I don’t get along that well), I though to ask someone more knowledgable. I’m sorry if my ignorance upsets you.
It seems to me that you never ever took the trouble to study
man mount
and
man fstab
It is all there. In case you are still to lazy to look at it, this is an important (for your case) part of it man mount:
It may seem that way, but in fact I did study mount and fstab, probably sometime back in the early '90s (if not before). This is *nix, not Windoze: things aren’t supposed to change just for the heck of it.
You can still use as pointer to the device things like /dev.sdb1. That other ways of identifying the device are also in use, does not mean that the old way dos not work anymore.
Which is in short and without the teachings I added later, that what you now seem to understand.
I tried to lead you back to your question, which was:
How to mount USB device?
because you were lead off topic by seeing entries in fstab which have nothing to do whith that question.
In any case, my conclusion is that you are not satisfied with my approach in trying to help you, thus I will not charge you anything for the time and effort I have put in this thread.