LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 07-05-2008, 12:07 PM   #1
dewert
LQ Newbie
 
Registered: May 2005
Location: Canada
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13

Rep: Reputation: 0
External USB hard drive not auto-mounting - broken HAL?


Hello all

Running Slack 12.1.

I'm having some issues with getting an external hard drive to mount automatically with the proper permissions. It's an ntfs drive, and I can mount it manually as root, and also as user, after editing fstab to allow such a thing. However, upon trying to browse as a regular user, I can't enter any of the directories on the drive. So it seems to be a permissions thing so far.
pmount fixes the permissions problem, but this is still manual.

At one point, when I plugged it in, KDE was even popping up with a nice window asking me what to do.

However, responding with "open window to view files" or some such nonsense ended up with an error message saying that it would only work on systems with HAL.

Now I thought my system had HAL. The package is installed in any case. It would seem it's a little broken. Anyway, the drive is now not showing up in /media.

Here is my fstab entry for the drive (sdb1):
Code:
/dev/sdb1        /mnt/ext         auto        rw,users                       0   0
So, what I would like is to plug this in as a regular user, and have the drive mount automagically. Everything on the hard drive should then be accessible, executable, writable etc.

Thank you in advance!
 
Old 07-05-2008, 03:37 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Can you try ejecting the device, commenting out the fstab entry and re-inserting the drive. Different distro's may have slightly different architectures for how udev/hal/kde or gnome work together. On mine, an fstab entry will interfere with the functioning of hal. Make sure that you don't have a NOACPI kernel boot option. Also make sure the dbus and hal daemons are running.

Your fstab entry, if that is what you want to use, probably should use a FS_UUID value instead of a device. Device nodes change for external devices change. Also, use a file system type. If you want write access use the fuse module's "ntfs-3g" filesystem. Since the ntfs filesystem is foreign, you need to specify the ownership and permissions of the filesystem in your mount command. Use the uid= and gid= options. You can use either your UID & GID number or your username & group name. For the permissions, use "fmask=" and "dmask=". I think you also want the "nls=utf8" option. Check the mount manpage or mount.ntfs-fuse to be certain. This will give you write access if you want it. The "uid","gid","fmask" and "dmask" missing options are why only root had access.

If commenting out the fstab entry and restarting the hal and dbus daemon works, then your username will be the group owner of the device (by udevd) which is what will give you access. I'm not certain how kde & gnome & the hal daemons work together, and my system will be different than yours.

PS, the "users" option is OK if you have an fstab entry. I forgot the "noauto" entry which will prevent problems if the device isn't plugged in when you boot up. Together you should be able to mount the device as a normal user. You can use "udevinf -q env /dev/sdb1" and copy/paste the FS_UUID number into your /etc/fstab entry. For a fat32 pendrive, it will look like "ID_FS_UUID=486F-D871
". Use "UUID=486F-D871" in your fstab entry instead of the device.

Last edited by jschiwal; 07-05-2008 at 03:41 PM.
 
Old 07-05-2008, 05:03 PM   #3
Woodsman
Senior Member
 
Registered: Oct 2005
Distribution: Slackware 14.1
Posts: 3,482

Rep: Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534Reputation: 534
Comment out the fstab entry.

In Slackware ensure the following are executable: /etc/rc.d/rc.hald, /etc/rc.d/rc.messagebus, and /etc/rc.d/rc.udev.

Ensure the HAL daemon actually is running. Try ps ax | grep hald. You should see several entries and some of those should contain the word "polling."

After physically connecting the drive, verify the drive is recognized by again running the ps ax command. Also use the lssci command to view the scsi list before and after physically connecting.

You mentioned KDE. There are two configuration files maintained by KDE. They are in ~/.kde/share/config: mediamanagerrc and medianotifierrc. These files control how KDE responds to new devices. You might want to edit the files (or temporarily rename) to delete any references to the USB drive.

In the KDE Control Center, in KDE Components, Service Manager, ensure the two media startup services are enabled and running (KDED Media Manager and KDED Notifier Daemon). Both services must be enabled and running to have automounting work correctly.

Another nice troubleshooting tool is to enable both the Mounted Removable Medium and Unmounted Removable Medium desktop icons. Enable these options in the Control Center, Desktop, Behavior. Enabling these icons will provide you visual feedback on the desktop whether KDE recognizes the drives.

You mentioned the drive is formatted ntfs. Hopefully some of the other Slackers here with experience with the ntfs tools can provide additional guidance with that.
 
Old 07-06-2008, 11:56 AM   #4
dewert
LQ Newbie
 
Registered: May 2005
Location: Canada
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13

Original Poster
Rep: Reputation: 0
Hi, and thanks for the quick reply. I've commented out the fstab entry - no luck. The services are executable, but hald is not found when running ps ax | grep hald. I tried bringing it up manually, and then ps ax'ing again, but... nothing. I'm assuming this is my problem, right? How would one troubleshoot hald?

lsscsi works quite nicely, and the drive is recognized.

In kde, the services are fine, but I see no evidence of any configuration files of that name. I already had the desktop icons enabled (for purposes of troubleshooting), and they do nothing upon plugging/unplugging.

I would really prefer to not use fstab entries, because recognition and mounting is really something that I'd prefer to have happen automagically. I'm planning to use this laptop as my main computer, and I want to be able to get files from other people's pendrives without too much trouble.

I'm going to google for the problem of hal not running. Will be back soon if I find anything.

Cheers.
 
Old 07-06-2008, 12:10 PM   #5
dewert
LQ Newbie
 
Registered: May 2005
Location: Canada
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13

Original Poster
Rep: Reputation: 0
To try and get a clue of what hal is doing, I tried
Code:
hald --daemon=no --verbose=yes
and it gave me a LOT of feedback. Anyway, at the end it said:
Code:
10:03:18.503 [I] device.c:3823: add_dev: subsys=acpi sysfs_path=/sys/devices/LNXSYSTM:00/device:00/PNP0C14:00 dev= parent_dev=0x00000000
10:03:18.503 [I] coldplug.c:214: pool_num_freed = 78 (of 895)
10:03:18.503 [I] hotplug.c:142: /sys/devices/pci0000:00/0000:00:00.0 is a device (subsystem)
10:03:18.503 [I] device.c:3823: add_dev: subsys=pci sysfs_path=/sys/devices/pci0000:00/0000:00:00.0 dev= parent_dev=0x00000000
Segmentation fault
Segmentation fault is bad, right? :P But I don't know why it's doing this.
Any advice?
 
Old 07-06-2008, 03:53 PM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Did you check that you don't have a "noacpi" or similar boot option. Also check if the dbus daemon is running.

I'm thinking that either might cause a failure to start hald.

Last edited by jschiwal; 07-06-2008 at 11:36 PM.
 
Old 07-08-2008, 12:41 AM   #7
dewert
LQ Newbie
 
Registered: May 2005
Location: Canada
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13

Original Poster
Rep: Reputation: 0
Nope, that doesn't seem to be the problem.

ps ax | grep dbus:
Code:
 2873 ?        Ss     0:00 /usr/bin/dbus-daemon --system
 3312 ?        S      0:00 dbus-launch --autolaunch 6126efd389663f5236449d5c483196c8 --binary-syntax --close-stderr
 3313 ?        Ss     0:00 /usr/bin/dbus-daemon --fork --print-pid 5 --print-address 7 --session
 6545 pts/1    R+     0:00 grep dbus
And here is my /etc/lilo.conf:
Code:
# LILO configuration file
# generated by 'liloconfig'
#
# Start LILO global section
boot = /dev/sda
#compact        # faster, but won't work on all systems.
# Standard menu.
message = /boot/boot_message.txt

# Append any additional kernel parameters:
append=" vt.default_utf8=0"
#prompt
#timeout = 5
# VESA framebuffer console @ 1024x768x256
vga = 773

# End LILO global section
# Linux bootable partition config begins
image = /boot/vmlinuz
  root = /dev/sda3
  label =
  read-only  # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Hmm...

So, what do I try next?

Last edited by dewert; 07-08-2008 at 12:55 AM. Reason: incorrect bbcode
 
  


Reply

Tags
auto, dbus, drive, fstab, hal, hard, kde, mount, ntfs, slackware, usb


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto-mounting external NTFS USB hard drive. Cotobear Slackware 5 02-07-2010 02:46 AM
Problems mounting usb external hard drive... Linux~Powered Slackware 3 06-05-2008 10:55 AM
mounting external hard drive through usb lackita Linux - Hardware 6 02-25-2008 11:10 PM
USB External Hard Drive not mounting bkone Linux - Hardware 1 10-19-2007 10:45 AM
Trouble mounting external usb hard drive in openSuSe 10.2 birdofprey Linux - Hardware 3 04-19-2007 12:02 AM


All times are GMT -5. The time now is 04:39 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration