Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
auto mount
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
justineiler
n00b
n00b


Joined: 31 Oct 2003
Posts: 46
Location: Boulder CO

PostPosted: Tue Apr 05, 2005 5:15 pm    Post subject: auto mount Reply with quote

Ok so i got a ipod.......it works amazing with linux and in my opinion is better supported under linux then os X or windows.......
but heres my problem
every time i plug my ipod in i have to run a script i made to mount it as a user......
then when i unplug i have to su and run another script as root.....


how can i plug my ipod in and have it automaticly mount.....
and how can i unmount as a user

heres my fstab
Code:

/dev/sda2               /mnt/ipod       vfat            sync,nodev,user,rw,noauto       0 0


thanks..
-Justin

also a bonus question....
what is a good tool to do id3 tagging.......i need something like musizbrainz to tag all my mp3s in one go
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Tue Apr 05, 2005 8:44 pm    Post subject: Reply with quote

Emerge submount, load the module manually or put it into /etc/modules.autoload.d/kernel-2.x and change your fstab line to:

Code:

/dev/sda2               /mnt/ipod       subfs            sync,nodev       0 0


Your iPod gets mounted when you cd into /mnt/ipod and gets unmounted when you cd out of it. Works very well!

Tom
Back to top
View user's profile Send private message
fourhead
l33t
l33t


Joined: 03 Sep 2003
Posts: 875
Location: Cologne, Germany

PostPosted: Tue Apr 05, 2005 8:46 pm    Post subject: Reply with quote

Another good thing:

If you use udev, you can very easily configure it to create a device called e.g. /dev/ipod whenever your iPod is plugged in. The advantage is obvious: When you plug your iPod in, it's sda. But when you plug in another harddisk, USB stick or whatever, and THEN your iPod, your iPod will be sdb. Su submount would not mount your iPod but this other harddisk. With udev, you'd always have a device /dev/ipod - regardless of how many other devices there are.

Tom
Back to top
View user's profile Send private message
jsosic
Guru
Guru


Joined: 02 Aug 2004
Posts: 510
Location: Split (Croatia)

PostPosted: Wed Apr 06, 2005 12:42 am    Post subject: Reply with quote

Where can I learn more about udev and how to create devices?

And about automounting, check my howto on autofs:
https://forums.gentoo.org/viewtopic-t-277721.html
Back to top
View user's profile Send private message
xsak
n00b
n00b


Joined: 27 Aug 2003
Posts: 15
Location: Budapest, Hungary

PostPosted: Wed May 18, 2005 2:35 pm    Post subject: Reply with quote

jsosic wrote:
Where can I learn more about udev and how to create devices?


Here's a good doc:
http://www.reactivated.net/writing_udev_rules.html
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Thu May 19, 2005 2:14 am    Post subject: Reply with quote

Here's are some of my udev rules.

/etc/udev/rules.d/10-udev.rules
Code:

BUS="usb", KERNEL="sd*4", SYSFS{idVendor}="059b", SYSFS{idProduct}="0032", NAME="%k", SYMLINK="zip"
BUS="scsi", KERNEL="sr*", SYSFS{model}="CDRW9602EXT-B", NAME="%k", SYMLINK="cdrw cdroms/cdrw"
BUS="usb", KERNEL="sd*1", SYSFS{idVendor}="1058", SYSFS{idProduct}="0100", NAME="%k", SYMLINK="usbhd"
BUS="usb", KERNEL="sd*", SYSFS{idVendor}="03f0", SYSFS{idProduct}="4002", NAME="%k", SYMLINK="camera"

The first one is for my zip drive. Creates /dev/zip
The second is for my USB cdrw. I don't remember why I used scsi as the bus, when usb may have worked. Creates /dev/cdrw and /dev/cdroms/cdrw
The third is my USB hard disk. Creates /dev/usbhd
The fourth is for my HP USB camera. I mount it instead of using something like gphoto. Creates /dev/camera
Here are the corresponding fstab entries.

/etc/fstab
Code:

/dev/cdrw             /mnt/cdrw       iso9660,udf     noauto,ro,noatime,users,umask=000    0 0
/dev/zip                /mnt/zip          vfat                rw,exec,user,noauto,fmask=111          0 0
/dev/usbhd           /mnt/usbhd      reiserfs,vfat    rw,exec,user,noauto                           0 0
/dev/camera         /mnt/camera    vfat               rw,exec,user,noauto,fmask=111          0 0
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum