Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
How is USB meant to work?
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
Zephaniah
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2002
Posts: 112
Location: Australiosis

PostPosted: Mon May 12, 2003 5:35 pm    Post subject: How is USB meant to work? Reply with quote

I finally got my USB hard drive working... but it seems to load it up I have to type;

mount /dev/scsi/host0/bus0/target0/lun0/part1 /mnt/usb

Is this neccesary? Or is there something I'm missing about USB ?

One other thing is that only root can access the mounted USB directory. Do I change this by editing fstab and putting /dev/scsi/host0/bus0/target0/lun0/part1 into it with permissions set?
Back to top
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Mon May 12, 2003 7:26 pm    Post subject: Reply with quote

You can almost treat this harddrive as a cd drive for these purposes.

So putting

Code:

LOOKUP      ^usbdrive$           CFUNCTION GLOBAL mksymlink scsi/host0/bus0/target0/lun0/part1 usbdrive
REGISTER    ^scsi/host0/bus0/target0/lun0/part1$  CFUNCTION GLOBAL mksymlink $devname usbdrive
UNREGISTER  ^scsi/host0/bus0/target0/lun0/part1$  CFUNCTION GLOBAL unlink usbdrive


in devfsd.conf and then sending a killall -s HUP devfsd should give you /dev/usbdrive as a shortcut link to the drive.

and for the user to be able to mount the drive you need the owner flag very much the same as your cd drives.

so something like
Code:

/dev/usbdrive      /mnt/usbdrive    ?what filesystem?    noauto,owner  0 0


should be fine
Back to top
View user's profile Send private message
Zephaniah
Tux's lil' helper
Tux's lil' helper


Joined: 19 Sep 2002
Posts: 112
Location: Australiosis

PostPosted: Mon May 12, 2003 8:40 pm    Post subject: thanks! Reply with quote

Thanks for the help, it worked very well. Not sure how it works exactly, but now usbdrive comes up in the GNOME disks list, so mounting the drive is simple. Turns out I had to do;

Code:
/dev/usbdrive           /mnt/usbdrive   vfat            noauto,user,owner       0 0


so my regular user account could mount and access the contents of the drive. Thanks again!
Back to top
View user's profile Send private message
David_Escott
l33t
l33t


Joined: 12 Jan 2003
Posts: 952
Location: Boston, MA

PostPosted: Mon May 12, 2003 9:08 pm    Post subject: Reply with quote

Well I can tell you how it works since that is the easy part :-P

The devfsd stuff just told devfs to make the symlink. For the icon on the desktop what happens is that nautilus scans the /etc/fstab looking for devices with the owner or user option. These devices are mountable by more than just root so if you can mount the device nautilus will show you an icon (if the device is plugged in) or occassionally poll the device to see if anything was added.
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