External USB hard drive not auto-mounting - broken HAL?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13
Rep:
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.
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.
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.
Distribution: Slackware 12.1 on laptop, Slackware 12.0 on ancient desktop
Posts: 13
Original Poster
Rep:
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.
# 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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.