LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   mount point for usb (https://www.linuxquestions.org/questions/slackware-14/mount-point-for-usb-604421/)

warun 12-04-2007 09:18 AM

mount point for usb
 
hi,

i'm using slackware 12... it has an USB auto-mount feature... i need to know where in the file system the USB will be mounted....

thanks in advance

kilgoretrout 12-04-2007 09:27 AM

IIRC slackware creates a mount point for automounted devices in /media and removes that mount point when the device is removed.

H_TeXMeX_H 12-04-2007 11:34 AM

Check '/etc/fstab', all the drives that will be automounted are listed there. You should also read the HAL sticky.

shadowsnipes 12-04-2007 11:49 AM

If you are using konqueror or dolphin you can ...

go to the storage media section
right click on the one for your USB stick->Properties->Mounting tab

It should tell you where it mounted it (eg. /media/disk).

You can also run the mount command (with no options) in a terminal as your normal user before and after the USB drive is mounted. Note the difference, and this should tell you where it is mounted.

rkelsen 12-05-2007 12:31 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 2979982)
Check '/etc/fstab', all the drives that will be automounted are listed there.

That can't be right.

H_TeXMeX_H 12-05-2007 03:43 AM

Quote:

Originally Posted by rkelsen (Post 2980639)
That can't be right.

Then please correct me.

To automount things, I followed the HAL sticky and you must add device nodes and corresponding mount points where they are to be mounted to your '/etc/fstab'. How is that wrong ?

rkelsen 12-05-2007 05:36 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 2980745)
To automount things, I followed the HAL sticky and you must add device nodes and corresponding mount points where they are to be mounted to your '/etc/fstab'. How is that wrong ?

Well I didn't do either of those things and HAL auto-mounts all the removable media I can throw at it. There are no USB devices in my /etc/fstab file.

H_TeXMeX_H 12-05-2007 05:44 AM

Really ? Well that's odd. It didn't do that for me.

zux 12-05-2007 06:09 AM

i didn't add anything to /etc/fstab and everything mounts for me too

onebuck 12-05-2007 06:52 AM

Hi,

Quote:

Originally Posted by zux (Post 2980838)
i didn't add anything to /etc/fstab and everything mounts for me too

Just to clear some things up. From the 'man fstab';
Quote:

FSTAB(5) Linux Programmer's Manual FSTAB(5)

NAME
fstab - static information about the filesystems

SYNOPSIS
#include <fstab.h>

DESCRIPTION
The file fstab contains descriptive information about the various file
systems. fstab is only read by programs, and not written; it is the
duty of the system administrator to properly create and maintain this
file.
HAL does not write to the '/etc/fstab' file either as noted by the 'static label' and the definition.

Quote:

excerpt from CHANGES_AND_HINTS.TXT;

The /dev/cdrom line in /etc/fstab is commented out by default, as it interferes
with HAL. HAL defaults to on, so if you do not wish to use it, you will need
to chmod -x /etc/rc.d/rc.hald and uncomment the /dev/cdrom line in /etc/fstab

Note that HAL will honor settings in /etc/fstab if a device is present there,
so you could technically have removable devices defined in /etc/fstab, but if
the fstab settings do not allow normal users to mount them (with the "user" or
"users" option), then HAL/dbus will not allow them to be mounted either.
Also note that you will need to run "/etc/rc.d/rc.messagebus reload" after
adding any users to plugdev, power, or video groups so that it re-reads the
/etc/group file.
As noted HAL will use the '/etc/fstab' if the device is defined.
Notice the user/users are not allowed to mount via HAL if not allowed in '/etc/fstab'.

piete 12-05-2007 07:52 AM

So, using fstab you can define where something *will* be mounted (by HAL or otherwise), or you use `mount` (which reads /etc/mtab) to see where something *has* been mounted.

Couple this with `dmesg` and you shall have no more mount-mysteries!

Hua!

- Piete.

shadowsnipes 12-05-2007 10:33 AM

Quote:

Originally Posted by piete (Post 2980930)
So, using fstab you can define where something *will* be mounted (by HAL or otherwise), or you use `mount` (which reads /etc/mtab) to see where something *has* been mounted.

Couple this with `dmesg` and you shall have no more mount-mysteries!

Hua!

- Piete.

Not completely correct. You can use the mount command not only to see what has been mounted but to also to do actual mounting (regardless of whether it is defined in fstab or anywhere else). The entries in fstab can allow a filesystem to be automatically mounted when "mount -a" is called (usually during bootscripts). If you define where a device should be mounted then. yes, that will be where HAL will mount it, but if it is not in fstab HAL will dynamically choose a mountpoint typically in /media. udev can also be a player and its rules can define all kinds of things when a device is attached. With udev rules you can, for instance, have the filesystem auto-mounted in a place you choose (with the owner and perms you specify of course), have programs run upon device insertion, and more.

H_TeXMeX_H 12-05-2007 10:41 AM

Quote:

Originally Posted by shadowsnipes (Post 2981070)
If you define where a device should be mounted then. yes, that will be where HAL will mount it, but if it is not in fstab HAL will dynamically choose a mountpoint typically in /media.

I see, well that makes more sense. I defined the mountpoints in fstab because I didn't know HAL would "dynamically choose a mountpoint" if it wasn't in fstab.

piete 12-05-2007 11:02 AM

Apologies, I should've made it clear that the command `mount` has more than just the use I stated, such as being able to mount arbitrary filesystems in arbitrary places =)


All times are GMT -5. The time now is 08:30 PM.