LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux > 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

Tags used in this thread
Popular LQ Tags ,

Reply
 
Thread Tools
Old 07-08-2008, 10:41 AM   #1
POW R TOC H
Member
 
Registered: Mar 2008
Location: Serbia
Distribution: Fedora
Posts: 37
Thanked: 0
USB Flash Memory problem... help :) ?


[Log in to get rid of this advertisement]
Hello.
In my first month of using Linux (about 4 months ago) I wanted to try and install a live version of DSL on my USB flash stick, and messed something up. I can't really remember what I did there, but whatever I did, my USB drive is history. It's not recognized as a mass storage device any more. (I should probably mention that I failed at installing DSL Live to it). However, I did the following :
Code:
ls /dev | grep usb > ~/usb1
#Then I inserted the flash and waited for a few secs
ls /dev | grep usb > ~/usb2

diff usb1 usb2
So after plugging in the device, three more devices appeared in my /dev directory:
Code:
> usbdev5.2_ep00
> usbdev5.2_ep01
> usbdev5.2_ep81
These are all the same device, but with different end points (if ep## stands for 'end point'), so I figured USB core found it but failed to assign a driver to control it. (I'm not an expert on this, so I'm sorry if I said something stupid, as I just wanted to give as much info as I can so someone can find a solution.) This 'revelation' gave me no solution... I have no idea as to how USB mass storage devices work, and what could of gone wrong, so fixing this is beyond me.

So, I guess my questions are :
Is there a way to examine the device, in order to provide more info on what's wrong (because I can't remember exactly what I did)?
I don't really want to throw away a 1Gb flash, so is there any way to fix this?

And yes, sorry if my English is bad, it's not my native language...
POW R TOC H is offline  
Tag This Post ,
Reply With Quote
Old 07-09-2008, 04:24 AM   #2
bigrigdriver
Senior Member
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: openSUSE 10.3 Debian 4.0
Posts: 4,654
Thanked: 13
Don't be too hasty to throw away the flash drive. Let us do a simple diagnostic first.

Boot the system without the flash drive. Copy the contents of /etc/mtab (fstab shows available mountable devices; mtab shows which devices are currently mounted).

After copying mtab, plug in the flash drive and wait a few seconds, then make another copy of /etc/mtab. There should be one new addition to mtab, showing the device and the mount point for the flash drive.

For the sake of example, let's say the new device is /dev/sdb. Run 'fdisk -l /dev/sdb'. What is the output of fdisk?

If fdisk shows more that one partition on the flash drive, you should be able to remove them all, then make one partition for the entire flash drive, and format it to the filesystem of your choice.
bigrigdriver is offline     Reply With Quote
Old 07-09-2008, 08:46 PM   #3
POW R TOC H
Member
 
Registered: Mar 2008
Location: Serbia
Distribution: Fedora
Posts: 37
Thanked: 0

Original Poster
Well, that's the problem
There are no changes in mtab or fstab...
What should I do next...? (Except throw it away)

PS : Thanks for helping
POW R TOC H is offline     Reply With Quote
Old 07-09-2008, 09:09 PM   #4
syg00
Guru
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 6,908
Thanked: 165
After you stick it in what does "dmesg" have to say ???.
syg00 is offline     Reply With Quote
Old 07-10-2008, 07:50 AM   #5
POW R TOC H
Member
 
Registered: Mar 2008
Location: Serbia
Distribution: Fedora
Posts: 37
Thanked: 0

Original Poster
Yes, it does :
Code:
[67516.928441] usb 5-3: new high speed USB device using ehci_hcd and address 3
[67517.061230] usb 5-3: configuration #1 chosen from 1 choice
[67517.061574] scsi3 : SCSI emulation for USB Mass Storage devices
[67517.061802] usb-storage: device found at 3
[67517.061806] usb-storage: waiting for device to settle before scanning
[67522.050591] usb-storage: device scan complete
[67522.051088] scsi 3:0:0:0: Direct-Access     Freecom  USB Card         5.00 PQ: 0 ANSI: 2
[67522.052696] sd 3:0:0:0: [sdb] 2072064 512-byte hardware sectors (1061 MB)
[67522.053311] sd 3:0:0:0: [sdb] Write Protect is off
[67522.053315] sd 3:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[67522.053318] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[67522.055430] sd 3:0:0:0: [sdb] 2072064 512-byte hardware sectors (1061 MB)
[67522.056055] sd 3:0:0:0: [sdb] Write Protect is off
[67522.056059] sd 3:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[67522.056061] sd 3:0:0:0: [sdb] Assuming drive cache: write through
[67522.056065]  sdb: sdb1
[67522.057216] sd 3:0:0:0: [sdb] Attached SCSI removable disk
[67522.057260] sd 3:0:0:0: Attached scsi generic sg2 type 0
After disconnecting :
Code:
[67593.013744] usb 5-3: USB disconnect, address 3

And here is what fdisk says :

Code:
$ sudo fdisk -l /dev/sdb

Disk /dev/sdb: 1060 MB, 1060896768 bytes
33 heads, 62 sectors/track, 1012 cylinders
Units = cylinders of 2046 * 512 = 1047552 bytes
Disk identifier: 0x0006cff8

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *           1        1012     1035275+  83  Linux
$ sudo fdisk -l /dev/sdb1

Disk /dev/sdb1: 1060 MB, 1060122112 bytes
33 heads, 62 sectors/track, 1011 cylinders
Units = cylinders of 2046 * 512 = 1047552 bytes
Disk identifier: 0x00000000

Disk /dev/sdb1 doesn't contain a valid partition table
POW R TOC H is offline     Reply With Quote
Old 07-10-2008, 07:55 AM   #6
syg00
Guru
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 6,908
Thanked: 165
How about (as root) "file -s /dev/sdb1" ???.
You've obviously got a (valid) partition - I'd just run mkfs and mount it.
syg00 is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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
Wireless & USB Flash Memory problem nimedon Linux - Hardware 1 01-09-2007 12:51 AM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 06:39 PM
Problem mounting USB flash memory bfair Linux - Newbie 2 02-26-2005 11:36 PM
Yet another USB/Flash Memory can't get to work problem maddogdelta Linux - Hardware 7 05-15-2004 06:06 PM
USB Flash memory writing problem tajuton Linux - Hardware 8 02-18-2004 03:17 AM


All times are GMT -5. The time now is 02:30 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration