PDA

View Full Version : how do I mount a usb flash drive?


Ken_ver_1_5
12-30-2005, 12:58 PM
spects: running Debian gnu/linux 3.1 Sarge
kde interface.

I plugged the usb flash device in. I shows in info center under
usb devices. I can't seem to get it to show in Konqueror.

I am sure its just a case of mounting it somehow.

ultrabuzz
12-30-2005, 03:59 PM
Depending on your kernel version, it would probably be reconized as some sort of scsi device. Do a fdisk -l and it should show you where it's at.
Then make a dir for it, usually under /mnt and mount it there with:
mount -t vfat /dev/xxxx /mnt/<your mount point here>

Note, for kernels v2.4.xx, it has to be compiled with scsi and multiple_scsi_luns support turned on.

Ken_ver_1_5
12-31-2005, 11:03 AM
I assume you mean to type this in terminal.
any easy way?

Ken_ver_1_5
12-31-2005, 11:24 AM
I used your " fdisk -I " in root.
I got:
mycomp:/# fdisk -i
fdisk: invalid option -- i

Usage: fdisk [-b SSZ] [-u] DISK Change partition table
fdisk -l [-b SSZ] [-u] DISK List partition table(s)
fdisk -s PARTITION Give partition size(s) in blocks
fdisk -v Give fdisk version
Here DISK is something like /dev/hdb or /dev/sda
and PARTITION is something like /dev/hda7
-u: give Start and End in sector (instead of cylinder) units
-b 2048: (for certain MO disks) use 2048-byte sectors

this is not working.

Ken_ver_1_5
12-31-2005, 12:54 PM
However using this command " pager /proc/bus/usb/devices "
I get this output:

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2
B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0000 ProdID=0000 Rev= 0.00
S: Product=USB UHCI Root Hub
S: SerialNumber=1080
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA
I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms
T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=0781 ProdID=5202 Rev= 0.10
S: Manufacturer=SanDisk Corporation
S: Product=Staples Relay
S: SerialNumber=+++++++-+++++-+++++++
C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=100mA
I: If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
/proc/bus/usb/devices (END)

ultrabuzz
12-31-2005, 01:25 PM
It's fdisk -L not i but with a small L to list partition table.
Yes, there is an easier way to mount it but first your have to know where linux sees it.

Ken_ver_1_5
12-31-2005, 03:14 PM
thanks for the help I found this http://www.debianhelp.org/Article3529.html
and can now mount it. For some reason I can seem to un mount it
"device is busy" and the permissions won't let me add or delete files.

ultrabuzz
12-31-2005, 03:54 PM
The link you posted leads you in the same direction I was going to. Glad it works.
You have to keep an eye on permissions though. If you created you mount point as root, a normal user will have no rw permission on it by default making the following part of the article importatnt:

Next, since you probably want to able to mount this device as a regular user, we will fool the system into thinking that your flash drive is a CD-ROM for security reasons:

chgrp cdrom /media/usb0
chmod a+rw /media/usb0

Ken_ver_1_5
12-31-2005, 05:28 PM
Thank you Again.
I solved my umount problem when I was logged in as root I forgot to umount
the device as root thats why it was busy as a user.
I know have full access as a user.

i hope this will help someone els over time:)