View previous topic :: View next topic |
Author |
Message |
justineiler n00b
Joined: 31 Oct 2003 Posts: 46 Location: Boulder CO
|
Posted: Tue Apr 05, 2005 5:15 pm Post subject: auto mount |
|
|
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 |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Tue Apr 05, 2005 8:44 pm Post subject: |
|
|
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 |
|
|
fourhead l33t
Joined: 03 Sep 2003 Posts: 875 Location: Cologne, Germany
|
Posted: Tue Apr 05, 2005 8:46 pm Post subject: |
|
|
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 |
|
|
jsosic Guru
Joined: 02 Aug 2004 Posts: 510 Location: Split (Croatia)
|
|
Back to top |
|
|
xsak n00b
Joined: 27 Aug 2003 Posts: 15 Location: Budapest, Hungary
|
|
Back to top |
|
|
manny15 Guru
Joined: 01 Dec 2002 Posts: 473 Location: USA
|
Posted: Thu May 19, 2005 2:14 am Post subject: |
|
|
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 |
|
|
|
|
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
|
|