You are not logged in.

#1 2007-09-07 01:40:33

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Looking to make mounting USB storage easier. (SOLVED)

I've already discovered how to use /etc/fstab to get what I need, but I need things more precise. For instance, my SD card reader always ends up as sd(c-z)1, while my Cowon D2 (mp3 player) shows up as sd(c-z), sd(d-z) if the SD card reader's already in.

I've heard that I can use udev to make it so that my SD card reader can be /dev/sd and my mp3 player can be /dev/d2 or something similar. Despite my attempts, however, I can't figure out how to get it to work well. I've even looked through the wiki and searched Google for good explanations. Could anyone help me?

Last edited by xelados (2007-09-07 08:00:05)

Offline

#2 2007-09-07 02:22:21

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Looking to make mounting USB storage easier. (SOLVED)

Am i correct if i then assume that using gnome-volume-manager to mount stuff for you automatically is _not_ what you're looking for, but just to control under what name stuff gets mounted? If you set a label with e2label (or mlabel if its fat32, from mtools package), the device gets mounted under /media/<label> (using nautilus to mount it of course)

But if you insist on mounting manually with fstab, you could mount by volume id (UUID=), or label (LABEL=) as well. do "man fstab"

Last edited by pelle.k (2007-09-07 02:25:38)


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

#3 2007-09-07 02:22:56

pain of salvation
Member
Registered: 2007-05-22
Posts: 76

Re: Looking to make mounting USB storage easier. (SOLVED)

I just installed HAL and dbus to get usb, cd, dvd and all removable media working. http://wiki.archlinux.org/index.php/HAL

In my fstab I have only configuration for my local partitions. Here is my fstab:

/dev/sda2 / ext3 defaults 0 1
/dev/sda4 swap swap defaults 0 0
/dev/sda3 /mnt/arquivos ext3 rw,auto,users, 0 2
/dev/sda1 /mnt/windows ntfs-3g noauto,noexec,nls=utf8,umask=0022 0 0

As you can see, there is no configuration for cd, dvd or usb, but they work perfectly.

Last edited by pain of salvation (2007-09-07 02:32:46)

Offline

#4 2007-09-07 07:16:15

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: Looking to make mounting USB storage easier. (SOLVED)

pelle.k: I'm afraid I'm not using a desktop environment; straight X with Fluxbox as my window manager. I like to keep things lightweight.  How do I figure out the volume ID or label of my USB devices? I tried mlabel and can't seem to figure out the label of my USB drive, which uses vfat as the filesystem.

pain of salvation: I have both HAL and dbus installed, and CDs and DVDs are handled without a hassle, but I have to manually mount my USB devices.

Offline

#5 2007-09-07 07:23:04

onearm
Member
From: Anywhere but here
Registered: 2006-07-06
Posts: 359
Website

Re: Looking to make mounting USB storage easier. (SOLVED)

xelados wrote:

How do I figure out the volume ID or label of my USB devices?

You can discover which label match to which device simply doing a ls -l in the /dev/disk/by-label/  (or in /dev/disk/by-uuid if you want the uuid).


To get something done, a committee should consist of no more than three persons, two of them absent.
--
My Github

Offline

#6 2007-09-07 07:41:44

retsaw
Member
From: London, UK
Registered: 2005-03-22
Posts: 132

Re: Looking to make mounting USB storage easier. (SOLVED)

You can set a label for FAT filesystems when you format them, but I don't know if there is a way to set it for an already created filesystem (although there should be).

Try the wiki guide on setting up custom symlinks for your devices using udev, which you can then use to mount them.  If you have problems with this tell us exactly what you tried and what problem you are having.

You could probably use the symlink under /dev/disk/by-id if that is what you want to do.

Last edited by retsaw (2007-09-07 07:43:08)

Offline

#7 2007-09-07 07:45:27

xelados
Member
Registered: 2007-06-02
Posts: 314
Website

Re: Looking to make mounting USB storage easier. (SOLVED)

Okay, there are clearly a lot of options here. What's the best one to use if I don't mind manually mounting?

EDIT: I followed the tutorial on the wiki and udev worked just fine! I apologize for all the confusion and thank everyone for their help. Now it's so much easier to mount my stuff!

Last edited by xelados (2007-09-07 07:59:47)

Offline

#8 2007-09-07 10:44:54

pelle.k
Member
From: Åre, Sweden (EU)
Registered: 2006-04-30
Posts: 667

Re: Looking to make mounting USB storage easier. (SOLVED)

You can set a label for FAT filesystems when you format them, but I don't know if there is a way to set it for an already created filesystem

I rename my partition labels all the time, be it ntfs, ext3 or fat32.
The trick with mtools is that you have got to have a .mtoolsrc with something like this to match your drive for the moment;

drive c:
        file="/dev/sdb1"
        mtools_skip_check=1

But other than that, its as easy as "mlabel c: newname"


"Your beliefs can be like fences that surround you.
You must first see them or you will not even realize that you are not free, simply because you will not see beyond the fences.
They will represent the boundaries of your experience."

SETH / Jane Roberts

Offline

Board footer

Powered by FluxBB