LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 12-12-2005, 04:53 AM   #1
Aju
LQ Newbie
 
Registered: Aug 2005
Location: ~
Distribution: Red Hat 9
Posts: 14

Rep: Reputation: 0
Thumbs down Unable to read/write usb 256mb memory stick


Hello,

Extremely sorry if the question put forth happens to be trivial,,(couldnt help it i did my best)

i have some problem with a 256MB USB memory stick which i tried connecting to my linux rh9.
i tried googling and experimented the following,

i added the line below in fstab

/dev/sda1 /mnt/stick vfat noauto,user,exec 0 0

and tried mounting after a re-login but to my great dismay i got the following error,,

mount: /dev/sda1 is not a valid block device

i also tried analysing the messages, the kernel spat out,(i couldnt understand much although)

tail -f /var/log/messages,,

and i got the following output,,,
Dec 12 15:49:56 kernel: hub.c: new USB device 00:14.2-2, assigned address 7
Dec 12 15:49:59 /etc/hotplug/usb.agent: Setup usb-storage for USB product 930/651d/100
Dec 12 15:50:00 devlabel: devlabel service started/restarted

i also pondered a bit on the basic check and the drivers exist in /proc/bus/usb

and the below is the output of the mount command,,
/dev/hda3 on / type ext3 (rw)
none on /proc type proc (rw)
usbdevfs on /proc/bus/usb type usbdevfs (rw)
/dev/hda2 on /boot type ext3 (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
none on /dev/shm type tmpfs (rw)
/dev/cdrom on /mnt/cdrom type iso9660 (ro)
none on /proc/bus/usb type usbfs (rw)

whatever i do the error just seems perpetual,,
i couldnt get much info pertaining to my problem in the older threads also

any help will be profusely appreciated

thank u for ur patience and interest,

Ajay.
 
Old 12-12-2005, 05:13 AM   #2
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 32
If you boot with the device plugged in, what is the output of dmesg? If it's plugged in all the time, run
Code:
demesg | less
from a terminal window and scroll through the output. You should see what device node the system assigns to the device, then you can adjust your /etc/fstab accordingly.
 
Old 12-12-2005, 05:58 AM   #3
Aju
LQ Newbie
 
Registered: Aug 2005
Location: ~
Distribution: Red Hat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Thank u Sargek for the prompt reply,,

I tried dmesg |less but couldnt understand what to look for to elicit the information required to edit fstab,,,,
I am not new to linux but definitely not good at it,,,sorry again

Ajay.
 
Old 12-12-2005, 09:20 AM   #4
purelithium
Member
 
Registered: Oct 2005
Location: Canada
Distribution: Mandriva 2006.0
Posts: 390

Rep: Reputation: 30
Does running "fdisk -l /dev/sda" list the proper partitions for the usb drive?
 
Old 12-12-2005, 10:53 AM   #5
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 37
Check with lsmod if you have modules "usb-storage" and "sd_mod" enabled.
There's good tutorial here:http://www.extremetech.com/article2/...1256766,00.asp
 
Old 12-12-2005, 07:42 PM   #6
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 32
Quote:
Originally Posted by Aju
Thank u Sargek for the prompt reply,,

I tried dmesg |less but couldnt understand what to look for to elicit the information required to edit fstab,,,,
I am not new to linux but definitely not good at it,,,sorry again

Ajay.
Basically what you are looking for is a /dev device. If you reboot with the usb stick inserted, then after the system is up, run dmesg | less and scroll through the text until you find /dev devices. You will see your hard drive listed as /dev/hda and your cdrom as /dev/hdc, or another letter. The usb stick should be picked up a scsi device, which will show as /dev/sda, or /dev/sdb, or some other letter. Whatever it shows as, would be what you would put in your /etc/fstab.

This is not related, but will matter once you figure out the device name: have you created the /mnt/stick directory? You referenced it in your post of your /etc/fstab, so if it is not created, you will need to do that beforr you can mount the stick there.
 
Old 12-13-2005, 03:57 AM   #7
Aju
LQ Newbie
 
Registered: Aug 2005
Location: ~
Distribution: Red Hat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Thank u people for ur response,

Hello purelithium,I tried sbin/fdisk -l /dev/sda as u had mentioned and i didnt get any output(does that mean i have to mkfs /dev/sda?)

Hello mdg,,,i checked with lsmod and i have modules "usb-storage" and "sd_mod" enabled.and thanks a bunch for the link(it is indeed informative)

And Sargek,,,i tried rebooting with the usb stick and did the dmesg command after and this is what i got
hub.c: new USB device 00:14.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x930/0x651d) is not claimed by any active driver.
i couldnt understand the messages(i presume something is wrong with /dev/sda ,is that correct?)
and yes i have created the mount point

Ajay.
 
Old 12-13-2005, 04:21 AM   #8
Reesl
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
I got problem on my USB Flash Drive too.

I am using similiar procedure as Aju and got bus_reset() not implemented and host_reset() implemented messages in dmesg

Is the Kernal too old ???
 
Old 12-13-2005, 04:48 AM   #9
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 32
Quote:
Originally Posted by Aju
Thank u people for ur response,

Hello purelithium,I tried sbin/fdisk -l /dev/sda as u had mentioned and i didnt get any output(does that mean i have to mkfs /dev/sda?)

Hello mdg,,,i checked with lsmod and i have modules "usb-storage" and "sd_mod" enabled.and thanks a bunch for the link(it is indeed informative)

And Sargek,,,i tried rebooting with the usb stick and did the dmesg command after and this is what i got
hub.c: new USB device 00:14.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x930/0x651d) is not claimed by any active driver.
i couldnt understand the messages(i presume something is wrong with /dev/sda ,is that correct?)
and yes i have created the mount point

Ajay.
Can you do this for me:
Code:
dmesg > boot.txt
. This will place the dmesg content into a file called boot.txt. Attach the boot.txt file to a post so I can see it. I am curious as to why there are no /dev entries listed in the dmesg output. Thanks.
 
Old 12-14-2005, 02:42 AM   #10
Aju
LQ Newbie
 
Registered: Aug 2005
Location: ~
Distribution: Red Hat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Hello Reesl,,, happy to know that i m not the only one suffering,

Quote:
Originally Posted by Sargek
Can you do this for me:
Code:
dmesg > boot.txt
. This will place the dmesg content into a file called boot.txt. Attach the boot.txt file to a post so I can see it. I am curious as to why there are no /dev entries listed in the dmesg output. Thanks.
Sure Sargek,,,

Code:
Linux version 2.4.20-8 (bhcompile@porky.devel.redhat.com) (gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)) #1 Thu Mar 13 17:54:28 EST 2003
BIOS-provided physical RAM map:
 BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
 BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
 BIOS-e820: 00000000000e0000 - 0000000000100000 (reserved)
 BIOS-e820: 0000000000100000 - 0000000020000000 (usable)
 BIOS-e820: 00000000fffc0000 - 0000000100000000 (reserved)
0MB HIGHMEM available.
512MB LOWMEM available.
On node 0 totalpages: 131072
zone(0): 4096 pages.
zone(1): 126976 pages.
zone(2): 0 pages.
Kernel command line: ro root=LABEL=/
Initializing CPU#0
Detected 547.628 MHz processor.
Console: colour VGA+ 80x25
Calibrating delay loop... 1091.17 BogoMIPS
Memory: 511412k/524288k available (1347k kernel code, 10312k reserved, 999k data, 132k init, 0k highmem)
Dentry cache hash table entries: 65536 (order: 7, 524288 bytes)
Inode cache hash table entries: 32768 (order: 6, 262144 bytes)
Mount cache hash table entries: 512 (order: 0, 4096 bytes)
Buffer-cache hash table entries: 32768 (order: 5, 131072 bytes)
Page-cache hash table entries: 131072 (order: 7, 524288 bytes)
CPU: L1 I cache: 16K, L1 D cache: 16K
CPU: L2 cache: 512K
Intel machine check architecture supported.
Intel machine check reporting enabled on CPU#0.
CPU:     After generic, caps: 0383f9ff 00000000 00000000 00000000
CPU:             Common caps: 0383f9ff 00000000 00000000 00000000
CPU: Intel Pentium III (Katmai) stepping 03
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Checking 'hlt' instruction... OK.
POSIX conformance testing by UNIFIX
mtrr: v1.40 (20010327) Richard Gooch (rgooch@atnf.csiro.au)
mtrr: detected mtrr type: Intel
PCI: PCI BIOS revision 2.10 entry at 0xed8a0, last bus=1
PCI: Using configuration type 1
PCI: Probing PCI hardware
PCI: Using IRQ router PIIX [8086/7110] at 00:14.0
Limiting direct PCI/PCI transfers.
isapnp: Scanning for PnP cards...
isapnp: No Plug & Play device found
Linux NET4.0 for Linux 2.4
Based upon Swansea University Computer Society NET3.039
Initializing RT netlink socket
apm: BIOS version 1.2 Flags 0x03 (Driver version 1.16)
Starting kswapd
VFS: Disk quotas vdquot_6.5.1
pty: 2048 Unix98 ptys configured
Serial driver version 5.05c (2001-07-08) with MANY_PORTS MULTIPORT SHARE_IRQ SERIAL_PCI ISAPNP enabled
ttyS0 at 0x03f8 (irq = 4) is a 16550A
ttyS1 at 0x02f8 (irq = 3) is a 16550A
Real Time Clock Driver v1.10e
Floppy drive(s): fd0 is 1.44M
FDC 0 is a National Semiconductor PC87306
NET4: Frame Diverter 0.46
RAMDISK driver initialized: 16 RAM disks of 4096K size 1024 blocksize
Uniform Multi-Platform E-IDE driver Revision: 7.00beta-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
PIIX4: IDE controller at PCI slot 00:14.1
PIIX4: chipset revision 1
PIIX4: not 100% native mode: will probe irqs later
    ide0: BM-DMA at 0x2090-0x2097, BIOS settings: hda:DMA, hdb:pio
    ide1: BM-DMA at 0x2098-0x209f, BIOS settings: hdc:DMA, hdd:pio
hda: ST340810A, ATA DISK drive
blk: queue c03c9f40, I/O limit 4095Mb (mask 0xffffffff)
hdc: LTN323, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: host protected area => 1
hda: 78165360 sectors (40021 MB) w/2048KiB Cache, CHS=5169/240/63, UDMA(33)
ide-floppy driver 0.99.newide
Partition check:
 hda: hda1 hda2 hda3 hda4 < hda5 >
ide-floppy driver 0.99.newide
md: md driver 0.90.0 MAX_MD_DEVS=256, MD_SB_DISKS=27
md: Autodetecting RAID arrays.
md: autorun ...
md: ... autorun DONE.
NET4: Linux TCP/IP 1.0 for NET4.0
IP Protocols: ICMP, UDP, TCP, IGMP
IP: routing cache hash table of 4096 buckets, 32Kbytes
TCP: Hash tables configured (established 131072 bind 65536)
Linux IP multicast router 0.06 plus PIM-SM
NET4: Unix domain sockets 1.0/SMP for Linux NET4.0.
RAMDISK: Compressed image found at block 0
Freeing initrd memory: 146k freed
VFS: Mounted root (ext2 filesystem).
Journalled Block Device driver loaded
kjournald starting.  Commit interval 5 seconds
EXT3-fs: mounted filesystem with ordered data mode.
Freeing unused kernel memory: 132k freed
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-uhci.c: $Revision: 1.275 $ time 17:59:01 Mar 13 2003
usb-uhci.c: High bandwidth mode enabled
PCI: Found IRQ 11 for device 00:14.2
usb-uhci.c: USB UHCI at I/O 0x2060, IRQ 11
usb-uhci.c: Detected 2 ports
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
usb-uhci.c: v1.275:USB Universal Host Controller Interface driver
usb.c: registered new driver hiddev
usb.c: registered new driver hid
hid-core.c: v1.8.1 Andreas Gal, Vojtech Pavlik <vojtech@suse.cz>
hid-core.c: USB HID support drivers
mice: PS/2 mouse device common for all mice
hub.c: new USB device 00:14.2-2, assigned address 2
usb.c: USB device 2 (vend/prod 0x930/0x651d) is not claimed by any active driver.
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,3), internal journal
Adding Swap: 1043240k swap-space (priority -1)
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
usb-uhci.c: interrupt, status 2, frame# 177
usb_control/bulk_msg: timeout
scsi0 : SCSI emulation for USB Mass Storage devices
hub.c: already running port 2 disabled by hub (EMI?), re-enabling...
usb.c: USB disconnect on device 00:14.2-2 address 2
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
USB Mass Storage support registered.
Soundblaster audio driver Copyright (C) by Hannu Savolainen 1993-1996
sb: No ISAPnP cards found, trying standard ones...
SB 3.01 detected OK (220)
ESS chip ES1869 detected
hub.c: Cannot enable port 2 of hub 1, disabling port.
hub.c: Maybe the USB cable is bad?
kjournald starting.  Commit interval 5 seconds
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,2), internal journal
EXT3-fs: mounted filesystem with ordered data mode.
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
ip_tables: (C) 2000-2002 Netfilter core team
Intel(R) PRO/100 Network Driver - version 2.1.29-k2
Copyright (c) 2002 Intel Corporation
 
PCI: Found IRQ 11 for device 00:0d.0
e100: selftest OK.
divert: allocating divert_blk for eth0
e100: eth0: Intel(R) PRO/100+ Alert on LAN* Management Adapter
  Hardware receive checksums enabled
  cpu cycle saver enabled
 
parport0: PC-style at 0x378 (0x778) [PCSPP,TRISTATE,EPP]
parport0: irq 7 detected
lp0: using parport0 (polling).
lp0: console ready
ide-floppy driver 0.99.newide
hdc: ATAPI 32X CD-ROM drive, 120kB Cache, DMA
Uniform CD-ROM driver Revision: 3.12
hdc: DMA interrupt recovery
hdc: lost interrupt
hdc: status timeout: status=0xd0 { Busy }
hdc: status timeout: error=0x00
hdc: DMA disabled
hdc: drive not ready for command
hdc: ATAPI reset complete
hub.c: new USB device 00:14.2-2, assigned address 3
usb-uhci.c: interrupt, status 2, frame# 2041
usb_control/bulk_msg: timeout
scsi1 : SCSI emulation for USB Mass Storage devices
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 3
hub.c: already running port 2 disabled by hub (EMI?), re-enabling...
usb.c: USB disconnect on device 00:14.2-2 address 3
hub.c: Cannot enable port 2 of hub 1, disabling port.
hub.c: Maybe the USB cable is bad?
Thanks again for your interest and promptness

Ajay.
 
Old 12-14-2005, 04:58 AM   #11
Sargek
Member
 
Registered: Jan 2003
Location: San Antonio, Texas
Distribution: Debian testing
Posts: 416

Rep: Reputation: 32
Hmmm. Are you running a usb hub, and is the stick plugged into the hub? I don't think it would matter, but maybe the hub is causing a problem. If you are running a hub, try plugging the stick directly into a usb port on the PC and see if the stick gets picked up then. I am running a USB hub with no problems, but they might all be different.
 
Old 12-14-2005, 06:53 AM   #12
Aju
LQ Newbie
 
Registered: Aug 2005
Location: ~
Distribution: Red Hat 9
Posts: 14

Original Poster
Rep: Reputation: 0
Hello Sargek,,,,this might sound a bit weird but i dont have a separate usb hub and all i did is plug in the usb stick to one of the ports located at the back of the pc.
 
Old 12-15-2005, 02:23 AM   #13
Reesl
LQ Newbie
 
Registered: Dec 2005
Posts: 2

Rep: Reputation: 0
Hi Ajay,

After I had upgraded the RedHat, I can access the USB drive now.
How about your case be Ok ?

Rees.


Quote:
Originally Posted by Aju
Hello Reesl,,, happy to know that i m not the only one suffering,


Ajay.
 
Old 03-09-2009, 03:24 AM   #14
ankita.dutta
LQ Newbie
 
Registered: Mar 2009
Posts: 7

Rep: Reputation: 0
Question

I want to read and write to USB port. How can I do that? Can anyone help me please?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to use new USB memory stick erraticassassin Slackware 4 02-13-2005 12:46 PM
Read a Sony Memory Stick? jago25_98 Linux - Hardware 2 11-23-2004 05:32 AM
USB Memory Stick/MP3 Player (Can't read files) jasarien Linux - Hardware 12 08-27-2004 04:09 PM
Mixing 512MB Ram 2700 stick with a 256MB 3200 stick? Will it screw things up? Fear58 Linux - Hardware 2 07-15-2004 01:20 PM
USB problems: Memorex USB stick 256MB and PSX to USB adapter by Radio Shack Knuckles T15 Linux - Hardware 1 05-19-2004 06:58 PM


All times are GMT -5. The time now is 06:53 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration