[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Advice needed: Accessing usb storage



On 17 Jan 2005, Rony wrote:
> I'm a linux newbie, need advice on how to access my usb thumb drive and
> external cd burner. Below are the informations from dmesg when i plug
> in those peripherals. Do i need to manually execute the mount command
> after the devices are inserted? 

Basically, yes.

> If yes, can somebody tell me what parameter to use for the mount
> command? 

Well, you want something like this:

] mount -t <type> <device> <where>

For <type>, you want 'vfat' for the memory stick (unless you formatted
it yourself), and 'iso9660' for the CD-ROM.


The <device> is the 'sda' or 'sr0' that you see in the dmesg there - the
SCSI device that they are assigned to.

Sadly, that SCSI device can change if (for example) you plug two memory
sticks in or whatever. You may want to look at the 'udev' package which
allows you to assign a more useful name to the devices.


Finally, for <where> you want to point at the appropriate directory on
disk for it.  That is, anywhere you feel like, basically, since the
content mounts into the same tree over some existing location.


That said, there is a better way to do this:

1. (Install and) configure udev to create a useful name for the device
   when it is inserted.

2. Edit your fstab to have a user-mountable entry for that device.
   (man 5 fstab, and look at the section on the 'fs_mntopts' for
   details.)

Alternately, you can skip the udev bit and just never put more than one
memory stick, etc, in place at one time. :)

Regards,
        Daniel
-- 
There's no sense in being precise when you don't 
even know what you're talking about.
        -- John von Neumann



Reply to: