LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Mounting external usb drive. (http://www.linuxquestions.org/questions/slackware-14/mounting-external-usb-drive-654185/)

glore2002 07-07-2008 07:32 PM

Mounting external usb drive.
 
Hi!
I bought an external usb hdd. When plugging it, nothing appears on screen. Slackware doesn't show up any drive.

How do I mount this drive? Is there a way to make Slackware mount this drive automatically every time I connect it?

Thank you!
Glore2002.-

MS3FGX 07-07-2008 07:55 PM

Slackware 12.1 will automatically mount new devices (assuming you are running a WM/DE that handles automounting, like XFCE or KDE), but previous versions will not.

If you are running something older than 12.1 (and don't want to upgrade) then you can make the system mount the drive at boot by putting an entry for it in /etc/fstab.

If you are running 12.1, where the device should be automatically mounted, then we need to do a little more diagnoses before we can determine the problem.

CJ Chitwood 07-07-2008 07:57 PM

I would look at the drive in fdisk or something like fdisk. Just view. The drive is probably /dev/sda or similar. if you can fdisk it, you now know what its designation is. Then edit fstab accordingly.

If fstab is properly set up (there's an option for automatic boot-time mount) then it should mount every time at boot if it's connected.


"man fstab" for more info.

justin_p 07-07-2008 08:29 PM

Add your user to the "plugdev" group. Problem solved. If it's NTFS you should be able to find tutorial here:
http://www.howtoforge.com/the_perfec...slackware12_p6

glore2002 07-07-2008 09:44 PM

fstab
 
Hello back!

I am running slackware 12.1. The disk is formatted in ntfs. My user is added to the plugdev group. When plugging my external usb disk (without adding anything to fstab or mounting the device by hand as root), it wasn't recognized.

Then I've added this to /etc/fstab:

Code:

/dev/sdb1        /usb_disk        ntfs-3g    umask=000        1  0
Now, when my system starts -with the ext hdd connected- and once in kde, the system (mouse included) freezes for a while. After that, I can move the mouse again. The device appears in system but No permission message when I try to access it.

Then if I mount the device as root from command line (mount /usb_disk) it works ok.

So Is my fstab line ok? How can I avoid my system freezing at start?
Any suggestions are very welcome. Thank you!
Glore2002.-

ubyt3m3 07-08-2008 12:25 AM

the system freezes because it's taking a bit longer time (for various reasons) to initialize your external hard disk, i think. is your external hd connected to usb2 port?

if you don't like the freeze-up at start up, maybe you can mount it as you need basis?

ciden 07-08-2008 03:20 AM

If your hdd is big, you should partition it, using one partition for frequently changing data, and other for less used files. You can save the time taken to mount.

The best thing to do in my opinion is to have a filesystem other than NTFS if windows compatibility is not an issue. Else depending on the maximum size of your files, you may go with fat32 but that does not support files > 4 Gb.

NTFS is not native *nix and maybe the ntfs software on ur machine is not optimised.
(I had poor performance when using ntfs when I used to dual boot xp. Now I am solo on Debian, so not much idea how good ntfs compability is now.)

CJ Chitwood 07-09-2008 07:43 PM

You might try changing "umask=000" to "umask=000,user"

According to 'man fstab', "user" allows users to mount the drive. I would expect, though, that "umask=000" would allow all users -- regardless of who mounts the drive -- to have full access to it.

One thing to note, too: ntfs AFAIK is not yet fully writeable in Linux. You can't create a new file, you can't change a file's size, etc. This may be treated like an access denial.

Mind you, I've never used true Slackware. YMMV.

shadowsnipes 07-10-2008 11:44 PM

Quote:

Originally Posted by CJ Chitwood (Post 3209381)
One thing to note, too: ntfs AFAIK is not yet fully writeable in Linux. You can't create a new file, you can't change a file's size, etc. This may be treated like an access denial.

Mind you, I've never used true Slackware. YMMV.

This is incorrect. NTFS is fully writable in Linux; you just can't assign correct ntfs permissions. This is not a Slackware feature, but rather a feature of ntfs-3g.

glore2002, you should not need an fstab entry for your removable ntfs partition. I don't know how your system is setup, but on mine I have it set so that nothing happens when I pop in my external hdd. If I'm using KDE, for instance, then I can go to 'Storage Media' in Konqueror/Dolphin and double click on the icon for the partition I want to load. Alternatively, I can use pmount-hal to load my partition. You could potentially use pmount with ivman to have your partition automatically loaded upon HAL events (such as your drive being connected). Assuming HAL/DBus/udev is working properly working on your machine this shouldn't be necessary, however.

Quote:

Originally Posted by glore2002
When plugging my external usb disk (without adding anything to fstab or mounting the device by hand as root), it wasn't recognized.

What do you mean by this? What did you read to determine this? Just because the partition wasn't automatically loaded does not mean that your drive is not recognized. You should check /var/log/syslog and /var/log/messages at the time you plug in your drive. Show us the output.

senthil.debian 07-11-2008 07:23 AM

Not able to access External HDD connected via USB
 
Hi,

I recently installed Slackware 12.1 on my Gateway MX6917J laptop and it is absolutely fabulous. I cursed myself for not switching to Slackware earlier. Oh well, have to live with it.

I also have the same problems faced by the OP. My external hdd connected to the USB port is recognized and the desktop icons appear when I either plug in a HDD (NTFS formatted) or a USB memory stick. But KDE throws the following error:

security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktop.Hal")

Hal is running:

bash-3.1$ ps ax | grep hal
2808 ? Ss 0:06 /usr/sbin/hald --daemon=yes
2809 ? S 0:00 hald-runner
2815 ? S 0:00 hald-addon-input: Listening on /dev/input/event4 /dev/input/event3 /dev/input/event2 /dev/input/event1 /dev/input/event6 /dev/input/event7 /dev/input/event5
2819 ? S 0:00 hald-addon-acpi: listening on acpid socket /var/run/acpid.socket
2821 ? S 0:05 hald-addon-storage: polling /dev/hda (every 2 sec)
18384 pts/2 S+ 0:00 grep hal


After plugging in the USB disk, if I do dmesg, it gives:
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usbmon: debugfs is not available
usb usb1: configuration #1 chosen from 1 choice
usb usb2: configuration #1 chosen from 1 choice
usb usb3: configuration #1 chosen from 1 choice
usb usb4: configuration #1 chosen from 1 choice
usb usb5: configuration #1 chosen from 1 choice
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver hiddev
usbcore: registered new interface driver usbhid
drivers/hid/usbhid/hid-core.c: v2.6:USB HID core driver
usb 1-2: new high speed USB device using ehci_hcd and address 2
usb 1-2: configuration #1 chosen from 1 choice
usb-storage: device found at 2
usb-storage: waiting for device to settle before scanning
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
usb-storage: device scan complete
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
usb 1-2: USB disconnect, address 2
usb 1-2: new high speed USB device using ehci_hcd and address 3
usb 1-2: configuration #1 chosen from 1 choice
usb-storage: device found at 3
usb-storage: waiting for device to settle before scanning
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
usb-storage: device scan complete
usb 1-2: USB disconnect, address 3
usb 1-2: new high speed USB device using ehci_hcd and address 4
usb 1-2: configuration #1 chosen from 1 choice
usb-storage: device found at 4
usb-storage: waiting for device to settle before scanning
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
sysfs: duplicate filename 'usb_storage' can not be created
kobject_add failed for usb_storage with -EEXIST, don't try to register things with the same name in the same directory.
usb-storage: device scan complete


And lsusb gives:

bash-3.1$ /sbin/lsusb
Bus 001 Device 004: ID 067b:2507 Prolific Technology, Inc. PL2507 Hi-speed USB to IDE bridge controller
Bus 001 Device 001: ID 0000:0000
Bus 005 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 004 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000

It appears that I also have ntfs-3g and fuse installed already. I would rather prefer to not to edit /etc/fstab simply when plugging a memory drive or external HDD everytime since I may have to use different kinds of external HDD (formatted differently:ntfs,ext3 etc).

Any pointers or any FM T R would be much appreciated. This is my first post, please excuse if there are any mistakes!

Thank You!

Senthil

ciden 07-11-2008 11:40 AM

@Senthil.debian

Permissions error.

I didnt need much access to my ntfs drive, so I only ever used it as root.
Maybe an fstab entry would do the trick for normal user.

Woodsman 07-12-2008 01:44 AM

Quote:

But KDE throws the following error:

security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktop.Hal")
Perhaps the following might help:

Mounting Devices As Root

MEC75 07-12-2008 03:54 AM

Quote:

Originally Posted by senthil.debian (Post 3211081)
I also have the same problems faced by the OP. My external hdd connected to the USB port is recognized and the desktop icons appear when I either plug in a HDD (NTFS formatted) or a USB memory stick. But KDE throws the following error:

security policy in place prevents this sender from sending this message to this recipient, see message bus configuration file (rejected message had interface "org.freedesktop.Hal.Device.Volume" member "Mount" error name "(unset)" destination "org.freedesktop.Hal")

You should add your user to the plugdev group at least (and maybe also to haldaemon and messagebus if it doesn't work)


MEC75

T3slider 07-12-2008 06:10 PM

senthil.debian, your problem is unrelated to the OP's problem and you should therefore start a new thread. However, to fix the problem, add your user to the plugdev group (and you should also add your user to the cdrom, audio and video groups for unrelated reasons). When you add users using `adduser`, it even tells you to press the up arrow to see the recommended groups (which include the groups listed above). In addition, in CHANGES_AND_HINTS.TXT, it says this:
Quote:

Originally Posted by CHANGES_AND_HINTS.TXT
User accounts with permission to mount removable devices must be in at
least the plugdev group, and the power group is also recommended to
allow shutdown and reboot via HAL methods.

Slackware-HOWTO also says this:
Quote:

Originally Posted by Slackware-HOWTO
To make an account for yourself, use the 'adduser' program. To start it,
type 'adduser' at a prompt and follow the instructions. Going with the
default selections for user ID, group ID, and shell should be just fine
for most users. You'll want to add your user to the cdrom, audio, video
plugdev (plugable devices like USB cameras and flash memory) and scanner
groups if you have a computer with multimedia peripherals and want to be
able to access these. Add these group names, comma separated, at the
following prompt:

Additional groups (comma separated) []:

CHANGES_AND_HINTS.TXT and Slackware-HOWTO are both located on the install CD/DVD and are considered essential reading -- especially CHANGES_AND_HINTS.TXT which contains hints to solve the most common problems encountered. In addition, this is the most frequently asked question on these forums, so a search should reveal further information (also, see the long HAL sticked thread at the top of these forums -- though I will admit that the thread is very polluted). In short, run this command:
Code:

gpasswd -a username groupname
To add your user to the plugdev group, for example, assuming your username is "senthil", you would use the following command:
Code:

gpasswd -a senthil plugdev


All times are GMT -5. The time now is 12:38 PM.