LinuxQuestions.org
View the Most Wanted LQ Wiki articles.
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 07-06-2007, 10:23 AM   #1
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Rep: Reputation: 64
usb stick not working in linux


I hate theses windows-only devices...
I have a new 512MB usb stick that works fine in Windows.

But in Linux, I have no sucess to use one of them. Amazing the effort the companies invest just to something work ONLY inwindows. I mean, it not work better than a regular device. It just work in Windows.

Anyway, the kernel messages:
Code:
Jul  6 12:05:47 babylon5 kernel: usb 5-8: new high speed USB device using ehci_hcd and address 12
Jul  6 12:05:47 babylon5 kernel: usb 5-8: configuration #1 chosen from 1 choice
Jul  6 12:05:47 babylon5 kernel: scsi12 : SCSI emulation for USB Mass Storage devices
Jul  6 12:05:52 babylon5 kernel: scsi 12:0:0:0: Direct-Access     USB 2.0  Flash Disk       1.0A PQ: 0 ANSI: 2
Jul  6 12:05:52 babylon5 kernel: SCSI device sdc: 1048576 512-byte hdwr sectors (537 MB)
Jul  6 12:05:52 babylon5 kernel: sdc: Write Protect is off
Jul  6 12:05:52 babylon5 kernel: sdc: assuming drive cache: write through
Jul  6 12:05:52 babylon5 kernel: SCSI device sdc: 1048576 512-byte hdwr sectors (537 MB)
Jul  6 12:05:52 babylon5 kernel: sdc: Write Protect is off
Jul  6 12:05:52 babylon5 kernel: sdc: assuming drive cache: write through
Jul  6 12:05:52 babylon5 kernel:  sdc: unknown partition table
Jul  6 12:05:52 babylon5 kernel: sd 12:0:0:0: Attached scsi removable disk sdc
Jul  6 12:05:52 babylon5 kernel: sd 12:0:0:0: Attached scsi generic sg3 type 0
Jul  6 12:06:53 babylon5 kernel: usb 5-8: reset high speed USB device using ehci_hcd and address 12
lsusb shows nothing, where a working usb stick is connected to Bus 005, device 012, for instance.
Code:
[root@babylon5 ~]# lsusb
Bus 004 Device 001: ID 0000:0000  
Bus 003 Device 001: ID 0000:0000  
Bus 005 Device 012: ID 2088:2098  
Bus 005 Device 001: ID 0000:0000  
Bus 001 Device 001: ID 0000:0000  
Bus 002 Device 004: ID 046d:c016 Logitech, Inc. M-UV69a Optical Wheel Mouse
Bus 002 Device 001: ID 0000:0000  
Bus 002 Device 003: ID 413c:2005 Dell Computer Corp.
The usb stick is detected in the sys pseudo filesystem:
Code:
[root@babylon5 ~]# cat /sys/block/sdc/removable 
1
[root@babylon5 ~]# cat /sys/block/sdc/dev
8:32
[root@babylon5 ~]# cat /sys/block/sdc/size 
1048576
[root@babylon5 ~]# cat /sys/block/sdc/device/model 
Flash Disk      
[root@babylon5 ~]#
But trying to access the /dev/sdc ("file -s /dev/sdc", "fdisk /dev/sdc" and even desesperated housewifes, ops, wrong channel, I mean, desesperated commands like "dd if=/dev/sdd of=/dev/sdc" (/dev/sdd is a working usb stick of same size, 512M) or even "dd if=/dev/zero of=/dev/sdc", results in timeout/hang with error messages in /var/log/messages:

Code:
Jul  6 12:07:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 131056
Jul  6 12:12:53 babylon5 kernel: end_request: I/O error, dev sdc, sector 0
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 0
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 1
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 2
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 3
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 4
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 5
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 6
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 7
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 8
Jul  6 12:12:53 babylon5 kernel: Buffer I/O error on device sdc, logical block 9
This usb stick is not a U3 SanDisk. It is a regular one, at least as much I can tell in Windows. It was formated as FAT16 and it was reformated as FAT32, just to try to solve this. No luck.

I and 4 co-workers have the same usb-stick our company gave to us. None of them works in my F7, 2.6.21-1.3228.fc7 and all works in Windows.

any ideas ?
 
Old 07-06-2007, 11:20 AM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
http://www.linuxquestions.org/questi...d.php?t=565536
 
Old 07-06-2007, 11:33 AM   #3
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 64
Hi jiml8 !

I already follow this thread, no luck.
First of all, there is no partition table that could be read from /dev/sdc. So, there is no /dev/sdc1 to mount.
Even so, if a try to mount /dev/sdc as the thread you pointed, the mount command hangs forever, with the same error messages in /var/log/messages.

I even try to create a image of the usb stick to try to mount as loopback device and analyze it, with "dd if=/dev/sdc of/tmp/sdc.data", but the command hangs as every other command I tried with the same kernel messages. In this particular case, the dd times-out after a couple of minutes;
Code:
[root@babylon5 ~]# dd if=/dev/sdc of=/tmp/sdc.data
dd: reading `/dev/sdc': Input/output error
0+0 records in
0+0 records out
0 bytes (0 B) copied, 60.2234 s, 0.0 kB/s
[root@babylon5 ~]# ll /tmp/sdc.data
-rw-r--r-- 1 root root 0 2007-07-06 13:09 /tmp/sdc.data
Isn't amazing ?
 
Old 07-06-2007, 12:18 PM   #4
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
I guess I didn't look closely enough at your original post.

This looks more like a usb driver problem or a hardware problem. Are you sure your usb stack is up to date?

What happens if you boot the same system into Windows? Can you do that? If you do, is the stick functional then? I am wondering if there is some possibility that your USB port(s) are insufficiently powered or some such. Wouldn't think so, but...
 
Old 07-06-2007, 01:00 PM   #5
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 64
Yes, my personal machine has dual boot, but don't tell to anyone
The other system is Windows XP SP2 and it recognized the usb stick in the first time, no need to install any drives or any unusual procedures.

Right clicking in My Computer Icon/Manage Computer, and opening the disk manager, showed the F: disk as Removable media. Right there, I right clicked on the drive and choose to format as FAT32. (The original format was FAT16).

I successfully wrote files and directories to the disk until it almost full in capacity.
I unplugged it and plugged it again, all files are there. I delete the files without any problems.

So, I am sure it works in windows in this same hardware and USB port.

And as additional information, I tried to access this usb stick in a Win98 machine, but it not recognized it, but I think it is normal in windows 98.
Another test was to wrote mp3 files on it and plug it on my mp3 car player which has a usb port to play mp3 files.
Guess what ? The player does not recognized the usb stick. Nothing happens !

It works only in Windows XP.

Is this strange or what ?
 
Old 07-06-2007, 06:38 PM   #6
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 114Reputation: 114
Quote:
It works only in Windows XP.

Is this strange or what ?
Sounds to me like a defective product. Which seems very odd. What happens if you format it FAT16? I understand that it was originally FAT16 and didn't work?
 
Old 07-10-2007, 08:28 AM   #7
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 64
I formated the device as FAT16 again, no luck. I got the same behavior. The device hangs on accessing /dev/sdc by any means.

On windows XP and Windows Vista it works fine.

On windows I was capable to verify the device has not a partition table ! It looks like more than a floppy disk than a hard disk.

On windows, programas like partition magic can not write to the device. They got a read only MBR message.

I believe this device is not a regular usb stick you can use as generic disk. It is a shame it was design to work only on windows.

see'ya,
 
Old 07-27-2007, 02:37 PM   #8
marozsas
Senior Member
 
Registered: Dec 2005
Location: Campinas/SP - Brazil
Distribution: SuSE, RHEL, Fedora, Ubuntu
Posts: 1,393
Blog Entries: 1

Original Poster
Rep: Reputation: 64
Just to close this thread.
Looks like it was a kernel problem. Upgrading my Fedora 7 to Linux babylon5.xxxxx.com.br 2.6.22.1-27.fc7 #1 SMP Tue Jul 17 17:13:26 EDT 2007 i686 i686 i386 GNU/Linux, the SAME usb stick is working now.
Code:
Jul 27 16:25:59 babylon5 kernel: usb 5-7: new high speed USB device using ehci_hcd and address 8
Jul 27 16:25:59 babylon5 kernel: usb 5-7: configuration #1 chosen from 1 choice
Jul 27 16:25:59 babylon5 kernel: scsi8 : SCSI emulation for USB Mass Storage devices
Jul 27 16:26:04 babylon5 kernel: scsi 8:0:0:0: Direct-Access     USB 2.0  Flash Disk       1.0A PQ: 0 ANSI: 2
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] 1041664 512-byte hardware sectors (533 MB)
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] Write Protect is off
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] 1041664 512-byte hardware sectors (533 MB)
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] Write Protect is off
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] Assuming drive cache: write through
Jul 27 16:26:04 babylon5 kernel:  sdc: unknown partition table
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: [sdc] Attached SCSI removable disk
Jul 27 16:26:04 babylon5 kernel: sd 8:0:0:0: Attached scsi generic sg3 type 0
Jul 27 16:26:04 babylon5 hald: mounted /dev/sdc on behalf of uid 500
Note the last line; it says hald mounted the device. In my first post, this step is missing. In fact,
Code:
# mount | grep sdc
/dev/sdc on /media/disk type vfat (rw,nosuid,nodev,uhelper=hal,shortname=lower,uid=500)
It is strange the same device now reports 1041664 512 sectors and not 1048576 as before.

I'm glad it is working in the new kernel and thanks to jiml8 for your time in this issue.

Last edited by marozsas; 07-27-2007 at 02:41 PM.
 
Old 08-14-2007, 03:14 PM   #9
danie_w
LQ Newbie
 
Registered: Apr 2006
Location: Centurion, Gauteng, South Africa
Distribution: Fedora 16, Ubuntu 12.04
Posts: 19

Rep: Reputation: 0
Pentax Camera not detected any more. After I installed F-Spot the camera would be detected and photos could be imported via the usb connection. But lately after some updates on FC6 the usb "disk" seems to come on and then disappears again.
From tail /var/log/messages I got:
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] Assuming drive cache: write through
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: rejecting I/O to dead device
Aug 13 23:09:42 bears last message repeated 4 times
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] READ CAPACITY failed
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK,SUGGEST_OK
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] Sense not available.
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: rejecting I/O to dead device
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] Write Protect is off
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: [sda] Assuming drive cache: write through
Aug 13 23:09:42 bears kernel: scsi 3:0:0:0: rejecting I/O to dead device
This seemed to happen every time I switched the device on.
Eventually after not seeing that it died (in messages) I tried to manually mount /dev/sda1 as -t vfat. Success. And then F-spot could also import and I could copy the files as well.
Can anyone help me here?
Where can I update this again for the database for auto mounting?

Aug 14 00:18:23 bears kernel: scsi 6:0:0:0: Direct-Access PENTAX DIGITAL_CAMERA 1.00 PQ: 0 ANSI: 2
Aug 14 00:18:23 bears kernel: sd 6:0:0:0: [sda] 3992576 512-byte hardware sectors (2044 MB)
(VendoreviceID - missing for the moment)
 
Old 08-14-2007, 10:39 PM   #10
kujirasan
Member
 
Registered: Mar 2007
Posts: 117

Rep: Reputation: 16
Many people have problem with the new models of USB products on the market, as they have new chipsets that causes the problem, I use a usb enclosure case witha 2.5inch hard drive in it as usb, the case is very old and it works, we changed to new case it just reads, the problem is the new chip is not supported, it be appreciate if you give a specific instruction where to go and how to download, install so the problem is rectified, as many people are not experienced LINUX user, be better if the instruction is detailed and in simple language
 
  


Reply

Tags
stick, usb


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
Linux on a Stick (USB) jimbo1954 Linux - Server 1 06-01-2007 06:05 AM
Which linux on usb stick Corrado Linux - General 3 04-11-2007 12:10 AM
get USB stick working - recompile kernel?? ditch* Linux - Newbie 8 08-02-2005 04:16 AM
mount/umount usb stick - PQI Intelligent Stick 2.0 sandbag Linux - Software 5 05-06-2005 11:12 AM
Installing Linux from a USB stick Mathiasdm Linux - Distributions 6 10-24-2004 02:43 PM


All times are GMT -5. The time now is 03:48 AM.

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