elementary usb memory stick question

elementary usb memory stick question

Post by Haines Brow » Tue, 07 Jun 2005 08:38:18



I'm trying to mount a usb memory stick. I find that when the fstab
line has:

  /dev/sdd     /media/usb-key    usbfs    ro,user  0 0

I can access the stick to see two directories, 001 and 002, and two
files, devices and drivers. However, I can't access the stick.

When I use in fstab:

  /dev/sdd     /media/usb-key    vfat    ro,user  0 0

I get
        $ sudo mount -t vfat /dev/sdd /media/usb-key
        mount: wrong fs type, bad option, bad superblock on /dev/sdd,
                missing codepage or other wrror
                In some cases useful info is found in syslot - try
                dmesg | tail or so

dmesg reports:

        $ dmesg | tail
        Device 08:30 not ready.
         I/O error: dev 08:30, sector 8
        Device 08:30 not ready.
         I/O error: dev 08:30, sector 16
        Device 08:30 not ready.
         I/O error: dev 08:30, sector 0
        FAT: unable to read boot sector
        Device 08:30 not ready.
         I/O error: dev 08:30, sector 0
        FAT: unable to read boot sector
        ...

syslog reports:

  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 80043136
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
  Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
  Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 16

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by Dances With Crow » Tue, 07 Jun 2005 09:18:40


On Sun, 05 Jun 2005 23:38:18 GMT, Haines Brown staggered into the Black
Sun and said:

Quote:>   /dev/sdd     /media/usb-key    usbfs    ro,user  0 0

Nope.  usbfs is a pseudo-filesystem not unlike /proc or /sys , and it's
usually mounted on /proc/bus/usb/ .  It is *not* a filesystem that
should be used for any storage device.

Quote:>   /dev/sdd     /media/usb-key    vfat    ro,user  0 0
>    $ sudo mount -t vfat /dev/sdd /media/usb-key
>    mount: wrong fs type, bad option, bad superblock on /dev/sdd,

Are you sure that the device isn't partitioned?  Many USB Mass Storage
devices are partitioned such that they have one partition covering the
entire device.  What happens if you try mounting /dev/sdd1 ?  Can you
"fdisk -l /dev/sdd" and see something rational in the output?

Quote:>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0

[snip repeats]

This is a little more troubling.  What's the output of "uname -a"?  Do
you see anything like "Device 0123:4567 is not claimed by any active
driver" in the output from dmesg right after you've plugged the device
in?  Is the usb-storage module loaded?  HTH anyway,

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /    mail: TRAP + SPAN don't belong
http://www.brainbench.com     /                Hire me!
-----------------------------/ http://crow202.dyndns.org/~mhgraham/resume

 
 
 

elementary usb memory stick question

Post by Haines Brow » Tue, 07 Jun 2005 10:45:07



Quote:> Are you sure that the device isn't partitioned?  Many USB Mass
> Storage devices are partitioned such that they have one partition
> covering the entire device.  What happens if you try mounting
> /dev/sdd1 ?

  $ mount /media/usb-key
  mount: /dev/sdd3 is not a valid block device

Or, if I use /dev/sdd1 (sdd1 and 2 and being used for other devices)

  $ mount /media/usb-key
  mount: wrong fs type, bad option, bad superblock on /dev/sdd,
         missing codepage or other wrror
         In some cases useful info is found in syslot - try
         dmesg | tail or so

Quote:> Can you "fdisk -l /dev/sdd" and see something rational in the
> output?

Nothing is returned.

Quote:> >   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
> >   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
> [snip repeats]

> This is a little more troubling.  What's the output of "uname -a"?

  $ uname -a
  Linux teufel.hartford-hwp.com 2.4.27-2-386 #1 Thu Jan 20 10:55:08
  JST 2005 i686 GNU/Linux

??!! I'm runnng kernel 2.6.8-1-386! Or so I thought. Turns out that my
vmlinuz symlink is pointing to the wrong kernel!

I have a copy of both the 2.4.27-2 and 2.6-8-1 kernels in
/boot, and /vmlinuz symlink is pointing to the wrong one! Could this
be my problem? If I simply remake the symlink to point to the right
kernel, am I opening myself to problems? No idea why I switched back
to the old kernel.

Quote:> Do you see anything like "Device 0123:4567 is not claimed by any
> active driver" in the output from dmesg right after you've plugged
> the device in?

No, just the I/O errors reported before.

Quote:> Is the usb-storage module loaded?  HTH anyway,

Yes, but it is unused.

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by Allen McIntos » Tue, 07 Jun 2005 11:43:42


Quote:> Or, if I use /dev/sdd1 (sdd1 and 2 and being used for other devices)

This isn't right.  If the memory stick really is /dev/sdd, then no
partition /dev/sdd? should point to any other device.

Quote:>   $ mount /media/usb-key

Are you editing /etc/fstab each time?  Please do the mount by hand (and
cut-and-paste the command into your posting) so we can see what is going
on.  I say this because the error message suggests you are still trying
to mount the raw device /dev/sdd.
Quote:>   mount: wrong fs type, bad option, bad superblock on /dev/sdd,
>     missing codepage or other wrror

 
 
 

elementary usb memory stick question

Post by Haines Brow » Tue, 07 Jun 2005 13:20:26



> > Or, if I use /dev/sdd1 (sdd1 and 2 and being used for other devices)
> This isn't right.  If the memory stick really is /dev/sdd, then no
> partition /dev/sdd? should point to any other device.

Not sure I quite follow. I had assumed that if the device was
partitioned, I'd use /dev/sdd1, but if not, /dev/sdd. My sda, sdb, and
sdc are hard disks, so I use sdd disk.

My loaded modules assume a 2.6.8-1 kernel, but it turns out that I'm
actually running the 2.4.27-2 kernel, and that may cause a problem,
for usb-support changed, didn't it (no module for scsi emulation)?
However, I mount an external usb hard disk without a problem.  

Quote:> >   $ mount /media/usb-key
> Are you editing /etc/fstab each time?  Please do the mount by hand
> (and cut-and-paste the command into your posting) so we can see what
> is going on.

I can't copy/paste from my xterm to emacs/gnus (select text in bash
xterm puts text into clipboard, but scrollbutton click or span click
do not paste except what happens already to be in emacs
clipboard). But here's a manual copy:

  $ sudo mount -t vfat /dev/sdd1 /media/usb-key
  mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
  missing codepage or other error
  In some cases useful info is found in syslog - try
  dmesg | tail or so

I get the same if I use /dev/sdd. My /dev/sdd1 file is owned by
root/disk and has rw permission.

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by Allen McIntos » Tue, 07 Jun 2005 22:16:50


Quote:> I had assumed that if the device was
> partitioned, I'd use /dev/sdd1, but if not, /dev/sdd. My sda, sdb, and
> sdc are hard disks, so I use sdd disk.

OK.  Your initial post sounded a little confused, that's all.

Quote:> My loaded modules assume a 2.6.8-1 kernel, but it turns out that I'm
> actually running the 2.4.27-2 kernel, and that may cause a problem,
> for usb-support changed, didn't it (no module for scsi emulation)?

Can't answer that one.  It's quite possible that the hotplug stuff isn't
100% happy because it's talking to the wrong major kernel release.

Quote:>   $ sudo mount -t vfat /dev/sdd1 /media/usb-key
>   mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
>   missing codepage or other error
>   In some cases useful info is found in syslog - try
>   dmesg | tail or so

> I get the same if I use /dev/sdd.

And IIRC you said that fdisk won't touch it?  Can you get at the first
512 bytes using dd?  If so, do they look like a partition table?  (You
will need "od" and a little googling to answer this one.)  I'm getting
desperate here....

You might want to try the 2.6.8 kernel.  IIRC you said that the vmlinuz
symlink was pointing to the wrong place?  Don't change it just yet - add
the 2.6.8 kernel to the boot loader configuration and reboot first.  You
may want to change the boot loader config to give yourself more time to
select a kernel.  I find that the default isn't long enough if you get
distracted while rebooting.

 
 
 

elementary usb memory stick question

Post by Haines Brow » Thu, 09 Jun 2005 06:03:41


I find that I can't mount my usb external drive, either. So the
problem not specific to the usb memory stick.

dmesg | tail reports that the device not ready, i/o error sector
2. Unable to read superblock. This whether I mount with fstab or with
command # mount -t ext2 /dev/sdd1 /media/mirror. This drive has worked
for a long time, and I've not changed anything nor rebooted. I've got
usb-storage, usb-uhci, and usbcfore modules loaded.  

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by Daniel D. O'Hallora » Thu, 09 Jun 2005 12:10:45



> I'm trying to mount a usb memory stick. I find that when the fstab
> line has:

>   /dev/sdd     /media/usb-key    usbfs    ro,user  0 0

> I can access the stick to see two directories, 001 and 002, and two
> files, devices and drivers. However, I can't access the stick.

> When I use in fstab:

>   /dev/sdd     /media/usb-key    vfat    ro,user  0 0

> I get
>    $ sudo mount -t vfat /dev/sdd /media/usb-key
>    mount: wrong fs type, bad option, bad superblock on /dev/sdd,
>            missing codepage or other wrror
>            In some cases useful info is found in syslot - try
>            dmesg | tail or so

> dmesg reports:

>    $ dmesg | tail
>    Device 08:30 not ready.
>     I/O error: dev 08:30, sector 8
>    Device 08:30 not ready.
>     I/O error: dev 08:30, sector 16
>    Device 08:30 not ready.
>     I/O error: dev 08:30, sector 0
>    FAT: unable to read boot sector
>    Device 08:30 not ready.
>     I/O error: dev 08:30, sector 0
>    FAT: unable to read boot sector
>         ...

> syslog reports:

>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 80043136
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 0
>   Jun  5 18:45:30 teufel kernel: Device 08:30 not ready.
>   Jun  5 18:45:30 teufel kernel:  I/O error: dev 08:30, sector 16

Haines,

I am a professed newbie but I would like to see the results of [tail -f
/var/log/messages] and then plug the device in.  I would like to see if
it is reporting errors when the device is plugged in.  It would also be
useful to see how the device is being detected.

I had a similar problem that was caused by a power problem in the front
two USB ports on my system.  They would power the device enough to light
the lamp but would only give me a couple of lines in the message logs
and would not fully or correctly identify the USB stick or the USB 80G
drive I was using.  I plugged into the back ports on the machine and
everything worked fine.  I spent a couple of days screwing around with
this problem.

Dan

 
 
 

elementary usb memory stick question

Post by Haines Brow » Thu, 09 Jun 2005 12:40:27


I found the difficulty with mounting usb external drive, so back to
the usb memory stick. On my USB bus are a working printer and external
hard disk.

  $ sudo mount -t vfat /dev/sdd1 /media/usb-key
  mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so

 $ dmesg | tail
  hub.c: new USB device 00:1f.4-2.2, assigned address 14
  WARNING: USB Mass Storage data integrity not assured
  USB Mass Storage device found at 14
  usb.c: USB disconnect on device 00:1f.4-2.2 address 14
  hub.c: new USB device 00:1f.4-2.2, assigned address 15
  WARNING: USB Mass Storage data integrity not assured
  USB Mass Storage device found at 15
  Device 08:31 not ready.
   I/O error: dev 08:31, sector 0
  FAT: unable to read boot sector

  $ sudo fdisk -l /dev/sdd
  [nothing returned]

When I have discover scan the busses, I see
  ...
  Intel Corp. 82801BA/BAM USB (Hub #1)
  Intel Corp. 82801BA/BAM USB (Hub #2)
  ...
  unknown unknown
  unknown unknown
  unknown unknown
  unknown unknown

lsmod | grep usb reports:

 usb-storage 0
 usb-uhci    0 (unused)
 usbcore     1 [usb-storage printer usb-uhci]
 ide-core    0 [usb-storage piix]
 scsi_mod    5 [usb-storage sd_mod aic...

I am running the 2.4.27-2-386 kernel. Running discover-modprobe had no
effect. The Lexar Jumpdrive 2.0 is new and I worry that it or the
(untested) cable may be defective. Does that seem likely possibility?

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by Daniel D. O'Hallora » Thu, 09 Jun 2005 12:49:04



> I found the difficulty with mounting usb external drive, so back to
> the usb memory stick. On my USB bus are a working printer and external
> hard disk.

>   $ sudo mount -t vfat /dev/sdd1 /media/usb-key
>   mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so

>  $ dmesg | tail
>   hub.c: new USB device 00:1f.4-2.2, assigned address 14
>   WARNING: USB Mass Storage data integrity not assured
>   USB Mass Storage device found at 14
>   usb.c: USB disconnect on device 00:1f.4-2.2 address 14
>   hub.c: new USB device 00:1f.4-2.2, assigned address 15
>   WARNING: USB Mass Storage data integrity not assured
>   USB Mass Storage device found at 15
>   Device 08:31 not ready.
>    I/O error: dev 08:31, sector 0
>   FAT: unable to read boot sector

>   $ sudo fdisk -l /dev/sdd
>   [nothing returned]

> When I have discover scan the busses, I see
>   ...
>   Intel Corp. 82801BA/BAM USB (Hub #1)
>   Intel Corp. 82801BA/BAM USB (Hub #2)
>   ...
>   unknown unknown
>   unknown unknown
>   unknown unknown
>   unknown unknown

> lsmod | grep usb reports:

>  usb-storage 0
>  usb-uhci    0 (unused)
>  usbcore     1 [usb-storage printer usb-uhci]
>  ide-core    0 [usb-storage piix]
>  scsi_mod    5 [usb-storage sd_mod aic...

> I am running the 2.4.27-2-386 kernel. Running discover-modprobe had no
> effect. The Lexar Jumpdrive 2.0 is new and I worry that it or the
> (untested) cable may be defective. Does that seem likely possibility?

Have you plugged the device into another computer to verify the device
itself is not defective?
 
 
 

elementary usb memory stick question

Post by Daniel D. O'Hallora » Thu, 09 Jun 2005 12:55:41




>> I found the difficulty with mounting usb external drive, so back to
>> the usb memory stick. On my USB bus are a working printer and external
>> hard disk.
>>   $ sudo mount -t vfat /dev/sdd1 /media/usb-key
>>   mount: wrong fs type, bad option, bad superblock on /dev/sdd1,
>>        missing codepage or other error
>>        In some cases useful info is found in syslog - try
>>        dmesg | tail  or so

>>  $ dmesg | tail
>>   hub.c: new USB device 00:1f.4-2.2, assigned address 14
>>   WARNING: USB Mass Storage data integrity not assured
>>   USB Mass Storage device found at 14
>>   usb.c: USB disconnect on device 00:1f.4-2.2 address 14
>>   hub.c: new USB device 00:1f.4-2.2, assigned address 15
>>   WARNING: USB Mass Storage data integrity not assured
>>   USB Mass Storage device found at 15
>>   Device 08:31 not ready.
>>    I/O error: dev 08:31, sector 0
>>   FAT: unable to read boot sector

>>   $ sudo fdisk -l /dev/sdd
>>   [nothing returned]

>> When I have discover scan the busses, I see   ...
>>   Intel Corp. 82801BA/BAM USB (Hub #1)
>>   Intel Corp. 82801BA/BAM USB (Hub #2)
>>   ...
>>   unknown unknown
>>   unknown unknown
>>   unknown unknown
>>   unknown unknown

>> lsmod | grep usb reports:
>>  usb-storage 0
>>  usb-uhci    0 (unused)
>>  usbcore     1 [usb-storage printer usb-uhci]
>>  ide-core    0 [usb-storage piix]
>>  scsi_mod    5 [usb-storage sd_mod aic...

>> I am running the 2.4.27-2-386 kernel. Running discover-modprobe had no
>> effect. The Lexar Jumpdrive 2.0 is new and I worry that it or the
>> (untested) cable may be defective. Does that seem likely possibility?

> Have you plugged the device into another computer to verify the device
> itself is not defective?

Ooops. I missed the part about you considering possibility of a
defective device or cable...sorry. I will read more carefully.

Dan

 
 
 

elementary usb memory stick question

Post by Haines Brow » Thu, 09 Jun 2005 13:47:05


I tried without the cable, and so ruled that out.

Testing the hardware on another machine might be possible. I've got a
box running NT that works, and it has a USB (prob. 1.0) socket. I
plugged in the stick, booted the machine, but I'm a Windows ignoramus,
and have no idea how to access a usb stick. Under System Properties,
drive icons are shown, but no USB drive.

When I plug in the key on the linux machine, a LED blinks momentarily,
but not when I plug it in to the NT machine. Does a USB memory stick
have a LED that is supposed to be permanently lit?

--

       Haines Brown
       KB1GRM      

 
 
 

elementary usb memory stick question

Post by RPR » Fri, 10 Jun 2005 05:32:29


Some time back I had never ending trouble with USB sticks (PNY and
Samsung) on an older IBM/Intel PPro board. I assume that the USB
controller on that chipset (early Triton) was buggy or defective.
What hardware are you running on?
Try to dd data back and forth on the raw device. Mine timed out after a
couple of megs, maybe as the sticks or USB controller got warm.
 
 
 

elementary usb memory stick question

Post by Daniel D. O'Hallora » Fri, 10 Jun 2005 10:56:30



> I tried without the cable, and so ruled that out.

> Testing the hardware on another machine might be possible. I've got a
> box running NT that works, and it has a USB (prob. 1.0) socket. I
> plugged in the stick, booted the machine, but I'm a Windows ignoramus,
> and have no idea how to access a usb stick. Under System Properties,
> drive icons are shown, but no USB drive.

> When I plug in the key on the linux machine, a LED blinks momentarily,
> but not when I plug it in to the NT machine. Does a USB memory stick
> have a LED that is supposed to be permanently lit?

Haines,

On a windows box your stick should show up as a new drive letter.

To see the drive you will need to right click on the start button in the
lower left corner, then choose "explorer"  This should list all drives
and folders.

Another way to look at the drive is to select "My Computer" from the
desktop and look for a new drive letter and the drive name that will
likely be the name of your stick drive (example "LEXAR MEDIA K:").  The
example is what I get when plugging my Lexar 1G jump drive into a
windows machine.

Dan

 
 
 

elementary usb memory stick question

Post by Haines Brow » Fri, 10 Jun 2005 21:21:18



> Some time back I had never ending trouble with USB sticks (PNY and
> Samsung) on an older IBM/Intel PPro board. I assume that the USB
> controller on that chipset (early Triton) was buggy or defective.
> What hardware are you running on?

It's an Intel D850MV motherboard, which I guess dates from 2001. My
next project will be to use a newer kernel to see if that helps.

Quote:> Try to dd data back and forth on the raw device. Mine timed out after a
> couple of megs, maybe as the sticks or USB controller got warm.

I purchased a new stick, which at least has an active LED when plugged
in. However, this was the result:

  $ sudo dd if=/opt/tmp/test of=/dev/sdd
  Password:
  dd: writing `/dev/sdd': Input/output error
  0+1 records in
  0+0 records out
  0 bytes transferred in 0.009271 seconds (0 bytes/sec)

However, I don't see why this would work, for /dev/sdd is not
connected to my stick. It's not like doing dd /dev/fd0. That is,
there's no dev interface that looks to the USB bus and specifically a
memory stick. The /dev/sdd could be any scsi device.

In the Sarge /dev directory, I have a /usb subdirectory of interfaces,
but I don't know that any is designed for a memory stick. For example,
there are: cpad0, ez*, hiddev*, lp*, mouse*, scanner*, usblcd. It
would be logical to find an interface for a usb memory stick here, but
none seem like it.

--

       Haines Brown
       KB1GRM