LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   automount usb hard drive at startup (https://www.linuxquestions.org/questions/debian-26/automount-usb-hard-drive-at-startup-694908/)

kutlu 01-04-2009 01:06 PM

automount usb hard drive at startup
 
I am trying to automountmount usb hard drive at computer startup

I have added following line to fstab:

/dev/disk/by-label/Fre... /home/kutlu/FreeAgent ntfs-3g defaults 0 0

This is ok at startup, but when I unplug and plug it, it does not mount again.

Do you now how to solve that problem
Or do you know how to mount all or some removable media at startup?


-----------
Debbian Lenny
Disk: Freeagent Go
Computer: XPS M1330

eco 01-04-2009 01:11 PM

I have never done this before but I think that the solution can be found using udev.

Have a look at the files in /etc/udev/rules.d and work it out. I used it for ethernet cards before, it should work for USB disks.

kutlu 01-04-2009 01:59 PM

Sorry about not giving enough detail

When I unplug and plug, conversation window that I always see in kde comes, ask me to open folder or etc, I say open, and It says "not enough permission".

So the required attemp is done, but there is a problem I cannot figure out.

There s also a problem with previously mounted folder. It is broken or sth when not unmounted before unplug.

Everything works fine if I do not add that line to fstab.

Nikosis 01-04-2009 02:05 PM

Instead defaults I would add umask=022 that gives write/read permission for root and read permission for users
Code:

... ... ntfs-3g umask=022 0 0

kutlu 01-04-2009 02:32 PM

When I use defaults, After startup, I have each permission to everybody.

Reading is permissiable, problem with permissions is, I do not have permission to mount it after it is unplugged and plugged. But I don't know how to solve it.

Nikosis 01-04-2009 02:44 PM

Try change umask from umask=022 to umask=0,user
Are you in plugdev group?

kutlu 01-04-2009 03:30 PM

adding "users" did something. I can umount it myself this time.
I had a new error, I thing it is about ntfs-3g
ntfs-3g-mount: failed to open /dev/fuse: Permission denied

yes, I'm in plugdev.

Nikosis 01-04-2009 04:12 PM

What about this
Quote:

ntfs-3g defaults,umask=000,gid=46,uid=1000 0 1

kutlu 01-05-2009 01:31 AM

I decided to use another method, I am using pmount. I added it to startup and it works fine with user account.
I cannot mount to desired directory, but I'm fine now.

Thanks, I will try last sugggestion sooner.


All times are GMT -5. The time now is 03:02 PM.