# still can't use USB Flash Disk

## PECIURA

when i connect usb storage i get message :

usb 1-2: new high speed USB device using ehci_hcd and address 3

usb 1-2: device descriptor read/64, error -71

scsi1 : SCSI emulation for USB Mass Storage devices

usb-storage: device found at 3

usb-storage: waiting for device to settle before scanning

  Vendor: Generic   Model: USB Flash Disk    Rev: 2.00

  Type:   Direct-Access                      ANSI SCSI revision: 02

sda: Unit Not Ready, sense:

Current : sense = 70  6

ASC=28 ASCQ= 0

Raw sense data:0x70 0x00 0x06 0x00 0x00 0x00 0x00 0x0a 0x00 0x00 0x00 0x00 0x28 0x00 0x00 0x00 0x00 0x00

SCSI device sda: 255488 512-byte hdwr sectors (131 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

SCSI device sda: 255488 512-byte hdwr sectors (131 MB)

sda: assuming Write Enabled

sda: assuming drive cache: write through

 sda: unknown partition table

Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0

Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0,  type 0

usb-storage: device scan complete

Any ideas  :Question: 

----------

## Atle

I'm no expert at this, but it looks okay.

Doing a

fdisk -l

doesn't the drive show up as /dev/sda?

----------

## PECIURA

something strange in partitions order ...

fdisk -l

Disk /dev/hda: 80.0 GB, 80060424192 bytes

255 heads, 63 sectors/track, 9733 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1               1         915     7349706    7  HPFS/NTFS

/dev/hda2   *         916         930      120487+  83  Linux

/dev/hda3             931        9733    70710097+   5  Extended

/dev/hda4            1837        8163    50821626+   7  HPFS/NTFS

/dev/hda5             931        1768     6731203+  83  Linux

/dev/hda6            1769        1836      546178+  82  Linux swap / Solaris

/dev/hda7            8164        9733    12610990    7  HPFS/NTFS

Disk /dev/sda: 130 MB, 130809856 bytes

5 heads, 50 sectors/track, 1021 cylinders

Units = cylinders of 250 * 512 = 128000 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   ?     3112544     7678583   570754815+  72  Unknown

Partition 1 has different physical/logical beginnings (non-Linux?):

     phys=(357, 116, 40) logical=(3112543, 3, 9)

Partition 1 has different physical/logical endings:

     phys=(357, 32, 45) logical=(7678582, 0, 39)

Partition 1 does not end on cylinder boundary.

/dev/sda2   ?      674759     8418872   968014120   65  Novell Netware 386

Partition 2 has different physical/logical beginnings (non-Linux?):

     phys=(288, 115, 43) logical=(674758, 0, 23)

Partition 2 has different physical/logical endings:

     phys=(367, 114, 50) logical=(8418871, 0, 12)

Partition 2 does not end on cylinder boundary.

/dev/sda3   ?     7479526    15223639   968014096   79  Unknown

Partition 3 has different physical/logical beginnings (non-Linux?):

     phys=(366, 32, 33) logical=(7479525, 4, 16)

Partition 3 has different physical/logical endings:

     phys=(357, 32, 43) logical=(15223638, 3, 7)

Partition 3 does not end on cylinder boundary.

/dev/sda4   ?           1    14548906  1818613248    d  Unknown

Partition 4 has different physical/logical beginnings (non-Linux?):

     phys=(372, 97, 50) logical=(0, 0, 1)

Partition 4 has different physical/logical endings:

     phys=(0, 10, 0) logical=(14548905, 4, 46)

Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

and ls /dev/sda

shows nothing

----------

## PECIURA

& flash disk doesn't blink. perhaps wrong fstab or wrong kernel configuration? 

#

# Plug and Play support

#

CONFIG_PNP=y

# CONFIG_PNP_DEBUG is not set

#

# Protocols

#

CONFIG_PNPACPI=y

#

# Block devices

#

CONFIG_BLK_DEV_FD=y

# CONFIG_PARIDE is not set

# CONFIG_BLK_CPQ_DA is not set

# CONFIG_BLK_CPQ_CISS_DA is not set

# CONFIG_BLK_DEV_DAC960 is not set

# CONFIG_BLK_DEV_UMEM is not set

# CONFIG_BLK_DEV_LOOP is not set

# CONFIG_BLK_DEV_NBD is not set

# CONFIG_BLK_DEV_SX8 is not set

# CONFIG_BLK_DEV_UB is not set

# CONFIG_BLK_DEV_RAM is not set

CONFIG_BLK_DEV_RAM_COUNT=16

CONFIG_INITRAMFS_SOURCE=""

# CONFIG_LBD is not set

# CONFIG_CDROM_PKTCDVD is not set

#

# IO Schedulers

#

CONFIG_IOSCHED_NOOP=y

CONFIG_IOSCHED_AS=y

CONFIG_IOSCHED_DEADLINE=y

CONFIG_IOSCHED_CFQ=y

#

# ATA/ATAPI/MFM/RLL support

#

CONFIG_IDE=y

CONFIG_BLK_DEV_IDE=y

#

# Please see Documentation/ide.txt for help/info on IDE drives

#

# CONFIG_BLK_DEV_IDE_SATA is not set

# CONFIG_BLK_DEV_HD_IDE is not set

CONFIG_BLK_DEV_IDEDISK=y

CONFIG_IDEDISK_MULTI_MODE=y

CONFIG_BLK_DEV_IDECD=y

# CONFIG_BLK_DEV_IDETAPE is not set

# CONFIG_BLK_DEV_IDEFLOPPY is not set

CONFIG_BLK_DEV_IDESCSI=y

# CONFIG_IDE_TASK_IOCTL is not set

#

# IDE chipset support/bugfixes

#

CONFIG_IDE_GENERIC=y

CONFIG_BLK_DEV_CMD640=y

# CONFIG_BLK_DEV_CMD640_ENHANCED is not set

# CONFIG_BLK_DEV_IDEPNP is not set

CONFIG_BLK_DEV_IDEPCI=y

CONFIG_IDEPCI_SHARE_IRQ=y

# CONFIG_BLK_DEV_OFFBOARD is not set

CONFIG_BLK_DEV_GENERIC=y

# CONFIG_BLK_DEV_OPTI621 is not set

CONFIG_BLK_DEV_RZ1000=y

CONFIG_BLK_DEV_IDEDMA_PCI=y

# CONFIG_BLK_DEV_IDEDMA_FORCED is not set

CONFIG_IDEDMA_PCI_AUTO=y

# CONFIG_IDEDMA_ONLYDISK is not set

# CONFIG_BLK_DEV_AEC62XX is not set

# CONFIG_BLK_DEV_ALI15X3 is not set

CONFIG_BLK_DEV_AMD74XX=y

# CONFIG_BLK_DEV_ATIIXP is not set

# CONFIG_BLK_DEV_CMD64X is not set

# CONFIG_BLK_DEV_TRIFLEX is not set

# CONFIG_BLK_DEV_CY82C693 is not set

# CONFIG_BLK_DEV_CS5520 is not set

# CONFIG_BLK_DEV_CS5530 is not set

# CONFIG_BLK_DEV_HPT34X is not set

# CONFIG_BLK_DEV_HPT366 is not set

# CONFIG_BLK_DEV_SC1200 is not set

# CONFIG_BLK_DEV_PIIX is not set

# CONFIG_BLK_DEV_NS87415 is not set

# CONFIG_BLK_DEV_PDC202XX_OLD is not set

# CONFIG_BLK_DEV_PDC202XX_NEW is not set

# CONFIG_BLK_DEV_SVWKS is not set

CONFIG_BLK_DEV_SIIMAGE=y

# CONFIG_BLK_DEV_SIS5513 is not set

# CONFIG_BLK_DEV_SLC90E66 is not set

# CONFIG_BLK_DEV_TRM290 is not set

# CONFIG_BLK_DEV_VIA82CXXX is not set

# CONFIG_IDE_ARM is not set

CONFIG_BLK_DEV_IDEDMA=y

# CONFIG_IDEDMA_IVB is not set

CONFIG_IDEDMA_AUTO=y

# CONFIG_BLK_DEV_HD is not set

#

# SCSI device support

#

CONFIG_SCSI=y

CONFIG_SCSI_PROC_FS=y

#

# SCSI support type (disk, tape, CD-ROM)

#

CONFIG_BLK_DEV_SD=y

# CONFIG_CHR_DEV_ST is not set

# CONFIG_CHR_DEV_OSST is not set

# CONFIG_BLK_DEV_SR is not set

CONFIG_CHR_DEV_SG=y

#

# Some SCSI devices (e.g. CD jukebox) support multiple LUNs

#

# CONFIG_SCSI_MULTI_LUN is not set

# CONFIG_SCSI_CONSTANTS is not set

# CONFIG_SCSI_LOGGING is not set

#

# SCSI Transport Attributes

#

# CONFIG_SCSI_SPI_ATTRS is not set

# CONFIG_SCSI_FC_ATTRS is not set

#

# SCSI low-level drivers

#

# CONFIG_BLK_DEV_3W_XXXX_RAID is not set

# CONFIG_SCSI_3W_9XXX is not set

# CONFIG_SCSI_ACARD is not set

# CONFIG_SCSI_AACRAID is not set

# CONFIG_SCSI_AIC7XXX is not set

# CONFIG_SCSI_AIC7XXX_OLD is not set

# CONFIG_SCSI_AIC79XX is not set

# CONFIG_SCSI_DPT_I2O is not set

# CONFIG_MEGARAID_NEWGEN is not set

# CONFIG_MEGARAID_LEGACY is not set

CONFIG_SCSI_SATA=y

# CONFIG_SCSI_SATA_AHCI is not set

# CONFIG_SCSI_SATA_SVW is not set

# CONFIG_SCSI_ATA_PIIX is not set

CONFIG_SCSI_SATA_NV=y

# CONFIG_SCSI_SATA_PROMISE is not set

# CONFIG_SCSI_SATA_SX4 is not set

CONFIG_SCSI_SATA_SIL=y

# CONFIG_SCSI_SATA_SIS is not set

# CONFIG_SCSI_SATA_ULI is not set

# CONFIG_SCSI_SATA_VIA is not set

# CONFIG_SCSI_SATA_VITESSE is not set

# CONFIG_SCSI_BUSLOGIC is not set

# CONFIG_SCSI_DMX3191D is not set

# CONFIG_SCSI_EATA is not set

# CONFIG_SCSI_EATA_PIO is not set

# CONFIG_SCSI_FUTURE_DOMAIN is not set

# CONFIG_SCSI_GDTH is not set

# CONFIG_SCSI_IPS is not set

# CONFIG_SCSI_INITIO is not set

# CONFIG_SCSI_INIA100 is not set

# CONFIG_SCSI_PPA is not set

# CONFIG_SCSI_IMM is not set

# CONFIG_SCSI_SYM53C8XX_2 is not set

# CONFIG_SCSI_IPR is not set

# CONFIG_SCSI_QLOGIC_ISP is not set

# CONFIG_SCSI_QLOGIC_FC is not set

# CONFIG_SCSI_QLOGIC_1280 is not set

CONFIG_SCSI_QLA2XXX=y

# CONFIG_SCSI_QLA21XX is not set

# CONFIG_SCSI_QLA22XX is not set

# CONFIG_SCSI_QLA2300 is not set

# CONFIG_SCSI_QLA2322 is not set

# CONFIG_SCSI_QLA6312 is not set

# CONFIG_SCSI_QLA6322 is not set

# CONFIG_SCSI_DC395x is not set

# CONFIG_SCSI_DC390T is not set

# CONFIG_SCSI_NSP32 is not set

# CONFIG_SCSI_DEBUG is not set

#

----------

## PECIURA

after "# mount /dev/sda /proc/bus/usb" usb key starts blinking but i dont see anything new i my device list. It seems i have missed to create new device or something. help,help...   :Crying or Very sad: 

----------

## Thomas Conneely

I'm having simila trouble with my flash disk, /dev/sda1 doesn't appear when I plug it in. Though when i boot with the disk plugged in /dev/sda1 is present and I can mount the drive.

I have found that enabling "Low Performance USB blockdriver" in the kernel (Device Drivers => Block Devices =>Low Performance USB blockdriver) allows me to mount drive with command:

```

mount -t vfat /dev/ub/a/part1 /mnt/usb

```

Does anybody know why this isn't the recommended technique?[/code]

----------

## PECIURA

have you tryed "cfdisk /dev/sda"? personaly, i was asked to press any key...

----------

## Thomas Conneely

Yep,

"Fatal error: can't open disk drive"

The device is not being created. Though now for whatever reason, the output from dmesg after plugging in the drive has changed. Before I had output simialr to peciura, now I either get

```

Jan 19 15:07:17 localhost usb 1-1: new high speed USB device using ehci_hcd and address 17

```

or

```
Jan 19 15:07:03 localhost usb 2-1: new full speed USB device using ohci_hcd and address 19

Jan 19 15:07:03 localhost usb 2-1: device descriptor read/64, error -110

Jan 19 15:07:03 localhost usb 2-1: device descriptor read/64, error -110

```

not to hijack your post or anything.

----------

## PECIURA

look at this it 

https://forums.gentoo.org/viewtopic.php?t=53537&highlight=usb+key+howto

----------

## Thomas Conneely

yeah this is what I did to setup my usb stick, but I have compiled them into the kernel so no help for me, unless there is something I missed. i'll go through the procedure again

----------

## PECIURA

but i would like that after i unplug usb key devise disapar. i'm going to re-emerge udev and hotplug

----------

## PECIURA

post your fstab. iwant to look a.t it

----------

## Thomas Conneely

Here you go

/dev/hdb1               /               ext3            noatime         1 1

/dev/hdb2               /home           ext3            noatime         1 1

/dev/hdb3               /mp3s           ext3            noatime         1 1

/dev/hdb4               none            swap            sw

/dev/hda        /mnt/media/dvd          iso9660         noauto,user     0 0

/dev/hdc        /mnt/media/cdr2         iso9660         noauto,user     0 0

/dev/hdd        /mnt/media/cdr1         iso9660         noauto,user     0 0

/dev/sda1       /mnt/media/usb          auto            noauto,user,rw 0 0

/dev/fd0                /mnt/floppy     auto            noauto,user     0 0

----------

## A.S. Pushkin

This is an old post so I you may have already solved this, but let me way in.

Mine is a new Gentoo install so it is not completely setup, but I can mount my 512 Mini Cruzer with this command:

bash-2.05b# mount /dev/sda1 /mnt

When I run a cat on mtab this is what I see:

bash-2.05b# cat /etc/mtab

/dev/hda23 / ext3 rw,noatime 0 0

none /dev devfs rw 0 0

none /proc proc rw 0 0

/dev/hda25 /usr ext3 rw 0 0

/dev/hda27 /var ext3 rw,noatime 0 0

/dev/hda26 /opt ext3 rw,noatime 0 0

/dev/hda24 /home ext3 rw,noatime 0 0

none /proc/bus/usb usbfs rw 0 0

none /dev/shm tmpfs rw 0 0

/dev/sda1 /mnt vfat rw 0 0

When I run ls on /mnt I see the directories I expect.. Note the last line. I know that all necessary modules are being loaded so my next step is tp get the automatic access.

This is a nibble at the problem approach. If you can not get this far then maybe the flash drive is dead. That happened to one of mine.

My $.02

----------

## PECIURA

after creating /dev/sda in fstab i can read everything, but want device to disapear. Anyway now i'm rading this http://www.reactivated.net/udevrules.php

----------

## Atle

 *PECIURA wrote:*   

> something strange in partitions order ...
> 
> fdisk -l
> 
> ....
> ...

 

It is possible for a drive to be without partitions, but with a filesystem on the root of the drive. If this is the case, or the content is just corrupted, it may show up like that. This can also confuse fdisk and make it unable to handle the drive.

Here's a suggestion:

dd if=/dev/zero of=/dev/sda

Make sure you enter the correct device.

This will fill the drive with zero's.

After writing zero's all over it, try using fdisk /dev/sda

----------

## PECIURA

everything is olmost ok .And i am not going to do format & secure erase hdd. a week ago i eraced partition table i know how long it takes to recover whole disk  :Laughing: 

----------

## Thomas Conneely

My pen is working, I can access with a knoppix bootCD and using the block device driver I described earlier. And I'm ~97% certain the configuration is correct, I must be missing something, or maybe its a bug in my motherboard's handling of USB and scsi emulation.

I'll do a clean re-compile of my kernel and get back to it later, but I've got 1st semester exams next week, which are a bit more important. I'll let you know what the problem is when I've fixed it.

----------

## PECIURA

After reading http://webpages.charter.net/decibelshelp/LinuxHelp_UDEVPrimer.html#UDEV and https://forums.gentoo.org/viewtopic.php?t=116093 i'm able to use usb flash drive just like floppy. still can not figure out how to meke device to disapear.  :Rolling Eyes: 

----------

## gsurbey

Can you please see if my recommendation works?

https://forums.gentoo.org/viewtopic.php?t=282903

----------

