# USB memory stick Dikon 4GB - Linux sees only 8MB.

## emitrax

Hi,

although this is not a stricly Gentoo related problem, I'm posting it

here in case someone else has already faced the same problem.

I just bought a Dikom 4GB memory stick, plug it

and linux only sees 8MB .

I've not idea what it could be, and I don't have another

system to test the device on.

Here is a bit of info.

lsusb -v 

=========================================================

Bus 005 Device 021: ID 1976:2092  

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  idVendor           0x1976 

  idProduct          0x2092 

  bcdDevice            1.00

  iManufacturer           0 

  iProduct                0 

  iSerial                 0 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           32

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          0 

    bmAttributes         0x80

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass         8 Mass Storage

      bInterfaceSubClass      6 SCSI

      bInterfaceProtocol     80 Bulk (Zip)

      iInterface              0 

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x01  EP 1 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0200  1x 512 bytes

        bInterval               0

Device Qualifier (for other device speed):

  bLength                10

  bDescriptorType         6

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        64

  bNumConfigurations      1

==========================================================

and the kernel log

==========================================================

[26344.448000] scsi15 : SCSI emulation for USB Mass Storage devices

[26344.462000] usb-storage: device found at 20

[26344.462000] usb-storage: waiting for device to settle before scanning

[26349.530000] scsi 15:0:0:0: Direct-Access     TOSHIBA  MK1637GSX             PQ: 0 ANSI: 2 CCS

[26349.566000] SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)

[26349.567000] sdb: Write Protect is off

[26349.567000] sdb: Mode Sense: 00 38 00 00

[26349.567000] sdb: assuming drive cache: write through

[26349.569000] SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)

[26349.569000] sdb: Write Protect is off

[26349.569000] sdb: Mode Sense: 00 38 00 00

[26349.569000] sdb: assuming drive cache: write through

[26349.569000]  sdb: sdb1

[26349.599000] sd 15:0:0:0: Attached scsi disk sdb

[26349.602000] sd 15:0:0:0: Attached scsi generic sg1 type 0

[26349.603000] usb-storage: device scan complete

============================================================

Kernel version 2.6.20.

Coudln't find anything on the web.

Any idea?

Regards,

S.

----------

## NeddySeagoon

emitrax,

```
[26349.566000] SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB) 
```

Your kernel isn't seeing the device properly ... thats 160Tb

What does lspci say about the device ?

----------

## whig

Open the stick device with fdisk. Probably not but the manufacturer may have made a very small partition on it.

----------

## Fitzcarraldo

Try using a low-level formatting tool to low-level format the pen drive (GParted cannot do it, GParted can only perform a normal format). I don't know of a tool in Linux that can low-level format drives so I use a freeware utility for Windows called HDDGURU Low Level Format Tool (http://hddguru.com/). Then use GParted to format the pen drive to FAT32 and then set the boot bit. Hopefully the pen drive should then be able to automount and Gentoo should see the correct size.

----------

## erik258

 *Quote:*   

> 
> 
> ```
> [26349.566000] SCSI device sdb: 312581808 512-byte hdwr sectors (160042 MB)
> ```
> ...

 

Did I miss some zeros somewhere?  Unless I'm counting wrong, I'm seeing 160,000 MB - 160 GB.

Could that be the OP's hard drive?  I found this online that maches that Toshiba model number:

http://sdd.toshiba.com/main.aspx?Path=StorageSolutions/2.5-inchHardDiskDrives/MK1637GSXPage

 *Quote:*   

> 
> 
> Try using a low-level formatting tool to low-level format the pen drive (GParted cannot do it, GParted can only perform a normal format). I don't know of a tool in Linux that can low-level format drives so I use a freeware utility for Windows called HDDGURU Low Level Format Tool (http://hddguru.com/). Then use GParted to format the pen drive to FAT32 and then set the boot bit. Hopefully the pen drive should then be able to automount and Gentoo should see the correct size.

 

what do you mean by "low level format"?  according to wikipedia http://en.wikipedia.org/wiki/Disk_formatting#Low-level_formatting_.28LLF.29_of_hard_disks low level formatting hasn't really applied to hard drives since the eighties, generally an erroneous reference to device reinitialization, something like a bad sector scan if I read correctly. 

 *Quote:*   

> GParted can only perform a normal format

 

the gparted manpage online calls gparted a 'frontend for parted', so we should really be talking about parted itself, not the gnome frontend.  as far as I can see from its man page, parted doesn't format things at all, but rather manages partitions in operations such as partition resizing.  It leaves me to question what  HDDGURU actually does; looking at it's site, I found:

 *Quote:*   

> 
> 
> This freeware Low Level Format utility will erase, Low-Level Format and re-certify a SATA, IDE or SCSI hard disk drive with any size of up to 281 474 976 710 655 bytes [281.5TB]. Will work with USB and FIREWIRE external drive enclosures. Low-level formatting of Flash Cards is supported too. Low Level Format Tool will clear partitions, MBR, and every bit of user data. 

 

So you could probably do the equivalent with 

```
dd if=/dev/zero of=/dev/hard-drive-device
```

after which you'd have to create a new partition table with fdisk and go on to partition normally.  

No, I agree with whig:

 *Quote:*   

> Open the stick device with fdisk. 

 

If you were to post the output of `fdisk -l` we might be able to better sort out which disk is which and how we could proceed.

----------

## emitrax

I'm sorry, I mistakenly added the wrong output. That was indeed my 160GB HD.

Sorry about that.

 *Quote:*   

> [  916.220000] scsi5 : SCSI emulation for USB Mass Storage devices
> 
> [  916.220000] usb-storage: device found at 8
> 
> [  916.220000] usb-storage: waiting for device to settle before scanning
> ...

 

Anyway, I tried it with a windows pc and it sees 8MB too, so I guess this is just a screw up stick.

Thanks,

S.

----------

## NeddySeagoon

emitrax,

It may well be a fake device. There are a lot of them around by even fakes have a lot more than 8Mb.

What does fdisk -l  /dev/sd...   say about your device?

Please check your kernel for the Scan all LUNs inder SCSI and make sure it is on.

Perhaps the device has several logical units?

Thats a long shot but worth a try. Windows will only see the first one, as will linux without that kernel option.

----------

## emitrax

But what would be the point of selling a 4GB stick that

not even windows would recognize.

 *Quote:*   

> xartime emitrax # fdisk  -l /dev/sdc 
> 
> Disk /dev/sdc: 8 MB, 8388608 bytes
> 
> 1 heads, 16 sectors/track, 1024 cylinders
> ...

 

----------

## whig

Knowing the stick has no data, create your own partition table and partition(s). I find it hard to believe it is that small. Btw, I create my own table/partitions always, anyhow, to render any malware dead be it autoruns or mbr.

----------

## cach0rr0

 *Fitzcarraldo wrote:*   

> Try using a low-level formatting tool to low-level format the pen drive (GParted cannot do it, GParted can only perform a normal format). I don't know of a tool in Linux that can low-level format drives so I use a freeware utility for Windows called HDDGURU Low Level Format Tool (http://hddguru.com/). Then use GParted to format the pen drive to FAT32 and then set the boot bit. Hopefully the pen drive should then be able to automount and Gentoo should see the correct size.

 

I've never found anything that a dd if=/dev/zero couldn't sort

----------

## cach0rr0

 *erik258 wrote:*   

> 
> 
> So you could probably do the equivalent with 
> 
> ```
> ...

 

BAH! I'm too slow once again

@original poster

```

dd if=/dev/zero of=/dev/sdc

```

----------

## Fitzcarraldo

 *cach0rr0 wrote:*   

>  *Fitzcarraldo wrote:*   Try using a low-level formatting tool to low-level format the pen drive (GParted cannot do it, GParted can only perform a normal format). I don't know of a tool in Linux that can low-level format drives so I use a freeware utility for Windows called HDDGURU Low Level Format Tool (http://hddguru.com/). Then use GParted to format the pen drive to FAT32 and then set the boot bit. Hopefully the pen drive should then be able to automount and Gentoo should see the correct size. 
> 
> I've never found anything that a dd if=/dev/zero couldn't sort

 

I have.

I bought a new 4 GB pen drive today: http://www.amazon.co.uk/gp/product/images/B001H3GLM0/

It was formatted as FAT32, and my installation running KDE 4.4.4 recognised it and auto mounted it when I plugged it in.

I then used UNetbootin version 485 to try to install SystemRescueCd version 1.5.6 onto it.

When this finished, I booted the pen drive. It booted to a UNetbootin command prompt rather than the usual SystemRescueCd prompt I was expecting.

I then decided to use GParted to delete the partition on the pen drive, create a new partition and format it. However GParted could not format it. The error message GParted gave was as follows:

 *Quote:*   

> GParted 0.5.2
> 
> Libparted 2.3
> 
> Create Primary Partition #1 (fat32, 3.73 GiB) on /dev/sdb  00:00:00    ( ERROR ) 
> ...

 

I then decided to try using dd as follows:

```
meshedgedx fitzcarraldo # dd if=/dev/zero of=/dev/sdb

dd: writing to `/dev/sdb': No space left on device

7833601+0 records in

7833600+0 records out

4010803200 bytes (4.0 GB) copied, 1023.86 s, 3.9 MB/s

meshedgedx fitzcarraldo # 
```

but GParted still gave the same error message as above.

I then booted into Windows 7, downloaded the HDDGURU Low Level Formatting Tool and ran it under Windows XP Compatibility Mode. When it finished I booted back into Linux, re-ran GParted and had no trouble partitioning and formatting the pen drive as FAT32.

So that HDDGURU Low Level Formatting tool does something extra that dd does not. I'm not entirely surprised, as dd does not format anything, it simply wipes/overwrites it. I wonder what that LLF tool actually does to a pen drive.

----------

