You are not logged in.
Pages: 1
Hi,
I am setting up my automount using autofs. I managed to get everything else to work however I can't get my usb stick to mount properly. It is recognised but when I try and enter the folder I get:
"Cannot obtain lock on /media/.hal-mtab"
The same happens when I try and use my external harddisk. My usb stick is "sdb1" and my external harddisk is "sdb4".
This is what my /etc/fstab looks like this:
#
# /etc/fstab: static file system information
#
# <file system> <dir> <type> <options> <dump> <pass>
none /dev/pts devpts defaults 0 0
none /dev/shm tmpfs defaults 0 0/dev/cdrom /mnt/cdrom iso9660 ro,user,noauto,unhide 0 0
/dev/dvd /mnt/dvd udf ro,user,noauto,unhide 0 0
/dev/sda2 / ext3 defaults 0 1
/dev/sda3 /home ext3 defaults 0 1
/dev/sda4 swap swap defaults 0 0
/dev/sda1 /mnt/windows ntfs-3g users,noauto,uid=1000,gid=100,fmask=0113,dmask=0$
My "auto.media" looks like this:
cdrom -fstype=auto,ro,nodev,nosuid :/dev/cdrom
usbstick -fstype=auto,async,nodev,nosuid,umask=000 :/dev/sdb1
Any idea how I can fix this?
Also I am using KDEmod. Does anybody know how I can have an icon appear on my desktop when a device automounts?
BFC
Last edited by BlueFightingCat (2008-01-09 18:34:41)
Offline
Hi,
I was doing some research to fix my problem. I found a post like this on some other forums:
When it says can't obtain lock, that means some other programme is trying to mount your media.
Try to login as root and insert your media. Also see if any other programme is accessing /media/.hal-mtab
Also, I don't know if this will work, but try restarting hal when you get that message. The command is:
rchal restart
But, you must be root to do this.
This is the only viable explanation I have at the moment.
Does anybody know any other common programmes that might be accessing /media/.hal-mtab?
How can I see if other processes are using the file?
Could it be a permissions problem??
BFC
Offline
1) One way you can check what's accessing that file is..
lsof | grep /media/.hal-mtab
lsof is the ls command for Open Files... you need to install it first though.
2) As for how to make the device show up on the desktop in KDE..
right click on the desktop --> configure desktop --> Behavior --> Device Icons tab
You can show mounted/unmounted devices etc..
Other then that, I can't help you with the autofs stuff as I have never used it (just using plain Hal and KDEmod here)
Good Luck
Offline
Hi Zer0,
Thank you for the information. Your advice in point number 2 worked great. Thanks for that.
Your advice in your post got me thinking. What I realised is that I had AutoFS and HAL running at the same time. So I removed AutoFS and things started working perfectly.
So as it seems you should only run one. Either AutoFS or HAL.
So now everything is fine!!
BFC
Offline
Too be honest I wasn't sure why you were running AutoFS in the first place, as Hal with KDE's "device pop-up" would do the job just fine.
Anyways glad I could help
Offline
I was following instructions in the WIKI. Sometimes its a little confusing. So once I discovered HAL, I had messed around enough with AutoFS that it was still lingering in the background.
BFC
Offline
Pages: 1