|
#1
|
|||
|
|||
|
USB flash drive on linux
How do i use my USB flash drive on linux? Even if i do not have any drivers in my PC. thanks.
|
|
#2
|
||||
|
||||
|
Open a terminal, plug in the usb device, run 'dmesg'. You'll see a lot of stuff go by, but you only need the bottom part. It should look something like this:
Code:
usb-storage: device found at 3 usb-storage: waiting for device to settle before scanning Vendor: USB2.0 Model: CardReader SD Rev: 0100 Type: Direct-Access ANSI SCSI revision: 00 SCSI device sda: 1000448 512-byte hdwr sectors (512 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 00 sda: assuming drive cache: write through SCSI device sda: 1000448 512-byte hdwr sectors (512 MB) sda: Write Protect is off sda: Mode Sense: 03 00 00 00 sda: assuming drive cache: write through /dev/scsi/host2/bus0/target0/lun0: p1 Attached scsi removable disk sda at scsi2, channel 0, id 0, lun 0 Attached scsi generic sg0 at scsi2, channel 0, id 0, lun 0, type 0 usb-storage: device scan complete Code:
root# fdisk -l /dev/sda Disk /dev/sda: 512 MB, 512229376 bytes 16 heads, 62 sectors/track, 1008 cylinders Units = cylinders of 992 * 512 = 507904 bytes Device Boot Start End Blocks Id System /dev/sda1 1 1008 499937 83 Linux For read/write priviledges, add the following line to your /etc/fstab file: /dev/sda1 /mnt/sda1 vfat noauto,user,exec,umask=000 0 0 Hope that helps. -kage
__________________
Tips for Linux Newcommers If we have helped you, please consider supporting Cyber Tech Help with a subscription.
|
|
#3
|
|||
|
|||
|
Is there any need to "eject" the USB after you have finished using it like in windows 2000/XP?
Oh, and a follow-up question: Do i have to run "dmesg" only once or do i need to run this everytime i reboot? thanks. |
|
#4
|
||||
|
||||
|
Yes, if you have any filesystem mounted (hard drive, cd, usb, etc) you should run 'umount /dev/device' before removing it. Change 'device' to the actual device (sda, cd, etc).
No, you don't have to run dmesg everytime. Thats just to let you know where the device is registered to. Now if you go to mount /dev/sda1 with the usb drive plugged in, and it says it cannot be found, you should run dmesg to check if its listed at /dev/sdb1, sdc1, and so on. -kage
__________________
Tips for Linux Newcommers If we have helped you, please consider supporting Cyber Tech Help with a subscription.
|
|
#5
|
|||
|
|||
|
Any good distro will place an icon on your desktop (KDE,Gnome) upon insertion of a USB. Simply double click (or single click, depending on your configuration) and you can browse its contents.
When done, right click the item and click on 'umount drive' or similar command.
__________________
Linux david 2.6.22-14-generic #1 SMP Tue Dec 18 05:28:27 UTC 2007 x86_64 GNU/Linux Chart of Linux equivalent Windows programs "Talk is cheap. Show me the code." - Linus Torvalds |
|
#6
|
|||
|
|||
|
i tried running dmesg, but it gets me this info. from the looks of it, there's something wrong with me USB ports... what could be the problem?
---------------------------------------------------------------------- usb 1-5: new high speed USB device using ehci_hcd and address 2 usb 1-5: device not accepting address 2, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 3 usb 1-5: device not accepting address 3, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 5 usb 1-5: device not accepting address 5, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 6 usb 1-5: device not accepting address 6, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 7 usb 1-5: new high speed USB device using ehci_hcd and address 8 usb 1-5: device not accepting address 8, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 9 usb 1-5: device not accepting address 9, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 10 usb 1-5: device descriptor read/64, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 11 usb 1-5: device not accepting address 11, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 12 usb 1-5: device not accepting address 12, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 14 usb 1-5: device not accepting address 14, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 16 usb 1-5: device not accepting address 16, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 17 usb 1-5: device not accepting address 17, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 19 usb 1-5: device not accepting address 19, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 20 usb 1-5: device not accepting address 20, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 21 usb 1-5: device descriptor read/64, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 22 usb 1-5: device not accepting address 22, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 23 usb 1-5: device not accepting address 23, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 24 usb 1-5: device descriptor read/64, error -71 usb 1-5: device descriptor read/64, error -71 usb 1-5: new high speed USB device using ehci_hcd and address 25 usb 1-5: device descriptor read/64, error -71 usb 1-5: device descriptor read/64, error -71 ----------------------------------------------------------------------------- Last edited by jethind; November 4th, 2005 at 11:03 AM. |
|
#7
|
|||
|
|||
|
Greetings!
I have the similar USB problem on xw9300 AMD64 running SuSE 10.0, KDE interface. As far as I see, the needed kernel modules are loaded: # lsmod | grep usb usb_storage 102976 0 usbcore 159924 4 usb_storage,ehci_hcd,ohci_hcd scsi_mod 181176 4 usb_storage,sg,libata,sd_mod ide_core 179256 5 usb_storage,ide_cd,generic,amd74xx,ide_disk Depending on a type of flash-disk, dmesg reveals the following: (i) usb 2-5: new high speed USB device using ehci_hcd and address 8 usb 2-5: device descriptor read/8, error -110 usb 2-5: device descriptor read/8, error -71 (ii) usb 2-5: new high speed USB device using ehci_hcd and address 10 usb 2-5: unable to read config index 0 descriptor/all usb 2-5: can't read configurations, error -110 usb 2-5: new high speed USB device using ehci_hcd and address 11 Initializing USB Mass Storage driver... scsi4 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 11 usb 2-5: new high speed USB device using ehci_hcd and address 14 scsi6 : SCSI emulation for USB Mass Storage devices usb-storage: device found at 14 usb-storage: waiting for device to settle before scanning usb 2-5: reset high speed USB device using ehci_hcd and address 14 usb 2-5: can't restore configuration #1 (error=-110) usb 2-5: USB disconnect, address 14 scsi: Device offlined - not ready after error recovery: host 6 channel 0 id 0 lun 0 usb-storage: device scan complete I would be very grateful to receive a helpful advice... |
|
#8
|
||||
|
||||
|
Appears to me the device is not getting enough power. What kinf of usb device is it? What kind of usb port are you plugging it into? (1.0/2.0)
__________________
Tips for Linux Newcommers If we have helped you, please consider supporting Cyber Tech Help with a subscription.
|
|
#9
|
|||
|
|||
|
I used disks-on-key (or flash disk, whatever they are called), and the machine has 2.0 ports.
I have read on the net I should mount such device as /dev/sda1 with FAT 32 partition. The problem is sda is my system disk that has only Linux partitions. It is much simple in the Windows, just plug it in... |
|
#10
|
|||
|
|||
|
Hey look where google brought me to
![]() New USB housing i bought for a spare laptop HDD. Has one small USB plug that goes into the housing and 2 'reg' USB plugs for the PC. Seems it needs both to the system for power. Worked fine at work on SuSe 10.0 but same OS at home heard the HDD 'ticking' over and this in dmesg Code:
kernel: usb 3-6: reset high speed USB device using ehci_hcd All working now, icon on desktop and the whole shebang!
__________________
Linux david 2.6.22-14-generic #1 SMP Tue Dec 18 05:28:27 UTC 2007 x86_64 GNU/Linux Chart of Linux equivalent Windows programs "Talk is cheap. Show me the code." - Linus Torvalds |
![]() |
| Bookmarks |
«
Previous Topic
|
Next Topic
»
| Topic Tools | |
|
|
All times are GMT +1. The time now is 10:46 AM.
[
RSS ]










