mounting 2 mp3 players in fstab, an example
Hi, I have two mp3 players that I have mounting correctly in my fstab. I'm
using SLAMD64 12.0.
First to find what to mount your device as, after plugging the player in,
execute this:
ls -d /dev/disk/by-id/
and look for your device. It takes 5-10 seconds to let it settle, so check
after that time.
I am assuming that you have udev on your system, if not you may not have
that directory...
Now that you know the name, you can enter a line in your /etc/fstab file,
which you have to be root to edit.
So you need to open a new terminal, become root, then start an editor, such
as joe, with the filename we want to edit:
su
(enter password to be root)
joe /etc/fstab
go to a blank line and make an entry (one per line) for your device using
the name found above (hope you kept that terminal open...)
when done, in joe, type control-K, then X to save and exit.
Below is a copy of my fstab to see the option switches that I use to mount a
Sansa e280 and a Vibez mp3 player.
This works for my system, hope it helps you get yours going.
Note that my fstab has comments for sections and lots of hard drives--you
can ignore them.
# --------- ide hard drives -----------------
/dev/disk/by-id/ata-ST3500630AS_9QG1AV5N-part1 / ext3
# defaults 1 1
/dev/disk/by-id/ata-ST3500630AS_9QG1AV5N-part2 swap swap
# defaults 0 0
/dev/disk/by-id/ata-ST3500630AS_9QG1AV5X-part1 /mnt/disk2 ext3
# defaults 0 2
/dev/disk/by-id/ata-ST3500630AS_9QG1B1N3 /mnt/disk3 ext3
# defaults 0 2
/dev/disk/by-id/ata-ST3500630AS_9QG167L3-part1 /mnt/disk4 ext3
# defaults 0 2
/dev/disk/by-id/ata-ST3500630AS_9QG15WSW-part1 /mnt/disk5 ext3
# defaults 0 2
/dev/disk/by-id/scsi-3600508e000000000afbe3c2e41fb6709-part1
# /mnt/sasr ext3 defaults 0 1
# --------- optical drives ------------------
/dev/sr0 /mnt/dvd auto noauto,owner,ro 0 0
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
# -------- special file systems -------------
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0
# --------- card reader in monitor ----------
/dev/disk/by-id/usb-Generic_Flash_HS-CF_000022272228-0:0-part1
# /media/cfcard auto noauto,users,owner,umask=000 0 0
/dev/disk/by-id/usb-Generic_Flash_HS-COMBO_000022272228-0:0-part1
//media/combo auto noauto,users,owner,umask=000 0 0
# --------- usb devices ----------------------
/dev/disk/by-id/usb-Maxtor_3200_604010016260-part1 /media/maxtor320
/auto users,defaults 0 0
/dev/disk/by-id/usb-Maxtor_OneTouch_IIIs_2CAD10K8-part1 /media/maxtor1000
/auto users,defaults 0 0
/dev/sdg /media/thumb auto noauto,users,owner 0
/0
# -------- sansa E280 mp3 player -------------
/dev/disk/by-id/usb-SanDisk_Sansa_e280_00000000-00000000-8680b38a-d925e817-00000000-0:0-part1
# /media/sansa-main vfat users,defaults,umask=000 0 0
/dev/disk/by-id/usb-SanDisk_Sansa_e280_00000000-00000000-8680b38a-d925e817-00000000-0:1-part1
//media/sansa-card vfat users,defaults,umask=000 0 0
# -------- vibez mp3 player ------------------
/dev/disk/by-id/usb-TrekStor_vibez_0510F7B07F6BA7D2C-0:0 /media/vibez vfat
/users,defaults,exec,umask=000 0 0
--------------------------
note that the umask option is set to 000 (zero,zero,zero) since the umask is
inverse of the permissions that you want (no kidding, see man page)
so a umask of 000 will give you permissions of 777, anybody can
read/write/execute to it, so you can copy files to your mp3 player without
being root.
Good luck and let us know how it goes.
Steve
|