Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Assigning specific block devices to USB appliances
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
3AndMe
n00b
n00b


Joined: 15 Apr 2005
Posts: 16
Location: Pennsylvania, USA

PostPosted: Fri Apr 15, 2005 5:40 am    Post subject: Assigning specific block devices to USB appliances Reply with quote

Greetings, all. This is my first post on this forum. I hope this question isn't too absurd. I've tried doing a search, but I couldn't find an answer. This question probably isn't Gentoo-specific, but since I'm using Gentoo, what the heck. Here goes:

I have several USB appliances (an iPod Shuffle, an external HD, and a digital camera) that I use frequently. I can mount and use them all without a problem, however because I don't leave them plugged in (I am always randomly connecting and disconnecting the devices), I don't know how to assign block devices to each of them. My /etc/fstab entries for these devices currently look like this:

Code:

/dev/sda1               /mnt/external   reiserfs        noauto,user,rw          0 0
/dev/sda1               /mnt/camera     vfat            noauto,user,rw          0 0
/dev/sda1               /mnt/ipod       vfat            sync,user,noauto,umask=000 0 0


As you can see, the problem here is that I can only use one device at a time. :cry: If I plug in all three devices, I can see sda1, sdb1, and sdc1 in /dev. As I unplug the appliances, the block devices disappear from /dev one by one, respectively (as they should). All fine and dandy, except I don't know how to setup my /etc/fstab with all those block devices because it depends on the order in which I plug the USB appliances in. For instance, I can't make the assumption that the external HD will always be /dev/sda1, or that the iPod will always be /dev/sdb1.

How can I set up my system to manage the ever-changing (dynamic?) block devices for the USB appliances? I want to be able to have any number of devices plugged in at any given time, in any order, and still have valid fstab info for each so that I can mount them just by clicking on the device shortcuts I have on my deskop. I don't want to have to manually "mount -t blah blah blah /dev/sdX /mnt/XXX" each time for each device.

I figure if I can just plug in and use my USB appliances in Windows, I should be able to do it in Linux too, right??? :wink:

For reference, my system is running 2.6.8-gentoo-r3. USB drivers are modular. I am not using udev or hotplug (I prefer to keep it like that, for now).
_________________
My Gentoo is broken again.
Back to top
View user's profile Send private message
acasto
Apprentice
Apprentice


Joined: 06 Feb 2004
Posts: 236
Location: Durka-Durka-Stan

PostPosted: Fri Apr 15, 2005 7:11 am    Post subject: Re: Assigning specific block devices to USB appliances Reply with quote

3AndMe wrote:
I am not using udev or hotplug (I prefer to keep it like that, for now).


Why not switch to UDEV? There's plenty of excellent Gentoo manuals and it will do all your talking about above.


- Adam
_________________
Leerrroooooyyyyyyyy JENKINS!!!!1111...................

"You know the Nazi's had pieces of flare.. that they made the Jews wear."
Back to top
View user's profile Send private message
3AndMe
n00b
n00b


Joined: 15 Apr 2005
Posts: 16
Location: Pennsylvania, USA

PostPosted: Fri Apr 15, 2005 7:19 am    Post subject: Reply with quote

^^^
Mainly because I have no experience with it. I don't know what would change because of it, and that kind of scares me because it took me long enough to get used to the system and how to administer it as it is. I would like to look into udev at some point, and if need be, I'll look into it much sooner if that will solve my problem like you suggest. If there is a way to do it without udev though, I'd be more than happy to know.

I'll take a look at the Gentoo docs on udev as soon as I get some time.
_________________
My Gentoo is broken again.
Back to top
View user's profile Send private message
3AndMe
n00b
n00b


Joined: 15 Apr 2005
Posts: 16
Location: Pennsylvania, USA

PostPosted: Sat Apr 16, 2005 12:34 am    Post subject: Reply with quote

*bump*

Any gurus on here know if what I'm looking to do is possible without udev?
_________________
My Gentoo is broken again.
Back to top
View user's profile Send private message
phsdv
Guru
Guru


Joined: 13 Mar 2005
Posts: 372
Location: Europe

PostPosted: Sat Apr 16, 2005 11:34 am    Post subject: Reply with quote

you might want to start here: http://gentoo-wiki.com/HOWTO_Customizing_UDEV
Back to top
View user's profile Send private message
3AndMe
n00b
n00b


Joined: 15 Apr 2005
Posts: 16
Location: Pennsylvania, USA

PostPosted: Sun Apr 17, 2005 2:18 am    Post subject: Reply with quote

Thanks for the link.
_________________
My Gentoo is broken again.
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