Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Is hotplug useful for usb mass devices
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
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Fri Jan 31, 2003 5:28 pm    Post subject: Is hotplug useful for usb mass devices Reply with quote

Hey, I've noticed that if I plug in a usb mass storage device after I'm logged in, the /dev/X entries don't get created. For example, if I plug in my usb zip drive and try to mount it I get

mount: special device /dev/sda4 does not exist

But if I log out, log back in, and try again it works. Actually, the drive makes "noises" when I log out as it reads the disk. Oh, I did put in a disk before pluggin it in. I thought hotplug solves this but I get the same behaivor. Maybe I need to add some kind of script, but I can't seem to find examples or good documentation of how hotplug works and how to set it up. Any ideas?
Back to top
View user's profile Send private message
Carlos
Guru
Guru


Joined: 07 Aug 2002
Posts: 458
Location: Providence, RI

PostPosted: Thu Feb 06, 2003 4:07 am    Post subject: Reply with quote

This sounds like something relating to /etc/devfsd.conf; I think you need to find out what the symlink /dev/sda4 (or whatever the device that fails to reappear is) points to (it'll be something like /dev/scsi/host1/bus0/target0/lun1/part1), and edit devfsd.conf accordingly - sadly I don't quite know how to do that myself yet.

ejwahl's message in USB Hard Drive should be helpful, though.
_________________
Man must shape his tools lest they shape him.
Back to top
View user's profile Send private message
manny15
Guru
Guru


Joined: 01 Dec 2002
Posts: 473
Location: USA

PostPosted: Thu Feb 06, 2003 3:26 pm    Post subject: Reply with quote

Thanks for the help. I got it working now. Here's what I did. I plugged in the usb zip drive and did a dmesg to get the proper scsi stuff which is where I got
Code:

scsi/host1/bus0/target0/lun0


Then I edited /etc/devfsd.conf
and added
Code:

# Create /dev/sda4 for the external USB drive
LOOKUP ^sda4 CFUNCTION GLOBAL mksymlink scsi/host1/bus0/target0/lun0/part4 sda4
REGISTER ^scsi/host1/bus0/target0/lun0/part4 CFUNCTION GLOBAL mksymlink $devname sda4
UNREGISTER ^scsi/host1/bus0/target0/lun0/part4 CFUNCTION GLOBAL unlink sda4

I send the HUP signal to the devfsd process using "kill". Then replug the zip drive. And mount /mnt/zip then worked. I didn't have to log out! Thanks! Now I plan to do the same with my usb cdrw.
Back to top
View user's profile Send private message
Carlos
Guru
Guru


Joined: 07 Aug 2002
Posts: 458
Location: Providence, RI

PostPosted: Fri Feb 07, 2003 2:01 am    Post subject: Reply with quote

manny15 wrote:
Thanks for the help.
No problem; thanks for posting details on what you did because I think I'll be able to make my setup better too - until now I've had the problem of not being able to use slots in my USB card reader unless a device was in it when booting.
_________________
Man must shape his tools lest they shape him.
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