# flash drive not recognized by fdisk [Solved]

## njcwotx

I insert a USB flash drive and dmesg reports the drive, but fdisk will not.  Is there a kernel setting I am missing or is there an alternative way to see the mount point?

dmesg reports "new high-speed USB device number 4 using ehci_hcd"

----------

## NeddySeagoon

njcwotx,

dmesg should alos list the partitions ...

```
[14332.310894] sr 18:0:0:1: Attached scsi generic sg12 type 5

[14332.314248] sd 18:0:0:0: [sdj] No Caching mode page present

[14332.314250] sd 18:0:0:0: [sdj] Assuming drive cache: write through

[14332.322100]  sdj: sdj1 sdj2 sdj3

[14332.327471] sd 18:0:0:0: [sdj] No Caching mode page present

[14332.327473] sd 18:0:0:0: [sdj] Assuming drive cache: write through

[14332.327474] sd 18:0:0:0: [sdj] Attached SCSI removable disk
```

Are you missing usb-storage support for your kernel?

Are you missing DOS Partition table support?

Most USB flash sticks start life as MSDos partitioned  devices.

----------

## njcwotx

Are you missing usb-storage support for your kernel? 

USB_STORAGE=y

Are you missing DOS Partition table support? 

CONFIG_MSDOS_PARTITION=y

CONFIG_MSDOS_FS=y

Most USB flash sticks start life as MSDos partitioned devices.

its a standard fat32 flash drive

A couple items to note.  the drive controller is an old ide pata type, and the computer is a bit legacy with a intel centrino processor.

lspci reports a TI PCIxx21 Integrated Flash Media Controller...ill check the kernel for that.

----------

## njcwotx

I found a comment about using setpci -v -s 02:06.3 4c=0x22  02:06.3 is correct in lspci

but i get missing width error

----------

## njcwotx

i dont have scsi disk support or scsi cd support, trying those.

----------

## njcwotx

scsi disk support did the trick

----------

## beliya

Hello njcwotx.

Can you please tell me how did you added the scsi support?

I've got 8gb usb stick that I used as a hdd with a live Debian on it which is now not recognized by fdisk but appears in lsusb and dmesg.

After reading your posts I now can see it as a scsi device (using lsscsi)

lsscsi |grep USB

[7:0:0:0]    disk    Generic  USB Flash Disk   7.76  /dev/sdb 

I will really appreciate it if you help me.

Regards,

Beliya

----------

## njcwotx

Im not in a position for the long answer at the moment.  Do you know how to use the kernel config tools and build a new kernel?  In device drivers in "make menuconfig" there is a place to add scsi disk support.  Off the top of my head and typing on an ipad its hard to create step by step instructions.  Tommorrow i can post more specific instructions if you need them.  Of course if you have not setup your own kernel you will need to review the docs on building your own kernel.  Its typically easy once you have an idea of how to do it.

Re reading your post, what flavor of linux are you using?  Is it gentoo or another variant?  The specific answer to add scsi disk support can depend on which flavor.  Ultimately its the same when the kernel is compiled but each one goes about the process is done differently.

----------

## beliya

Hello njcwotx.

Thank you for the quick reply.

I think I'm familiar with building kernel, I have done it some years ago and I think I can do it again. However, I thought that I can load the module using modprobe.

I am using Debian Linux on the machine. I will try to find my way around adding that module and if I encounter problems I will write back. 

By the way, this is output from dmesg after the USB stick has been plugged in

```
[ 7144.768092] usb 1-2: new high-speed USB device number 4 using ehci_hcd

[ 7144.982143] usb 1-2: New USB device found, idVendor=058f, idProduct=1234

[ 7144.982148] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0

[ 7144.982152] usb 1-2: Product: Mass Storage Device

[ 7144.982155] usb 1-2: Manufacturer: Alcor Micro

[ 7144.982666] scsi8 : usb-storage 1-2:1.0

[ 7145.981194] scsi 8:0:0:0: Direct-Access     Generic  USB Flash Disk   7.76 PQ: 0 ANSI: 4

[ 7145.983082] sd 8:0:0:0: Attached scsi generic sg2 type 0

[ 7145.985711] sd 8:0:0:0: [sdb] Attached SCSI removable disk
```

Thanks once again.

Regards,

Beliya

----------

## njcwotx

sorry took some time to get back to you, and that I cannot be of more help.  On Debian, I am not very familiar, however, I read there is a tool called modconf?  inside modconf you can configure kernel options, but I dont know if that is the sanctioned way in the Debian world.  In gentoo the tool is 'make menuconfig'.  I suppose modconf is a good try to do the similar task.

Or, even better, you might have to cruise through the Debain sites for enabling scsi disk support.  It should be a common task and I bet there is a tool to set the kernel.

----------

