# Micro SD card reported as 1.5 TB :-O

## Aquous

Hi!

I bought a 8 GB micro SD card. It has not been pre-formatted in any way by the factory. And from the looks of it, it's just filled with random data - including the partition table. When I plug it in into my card reader, I immediately recieve a slew of errors in dmesg as udisks-part-id tries to read from sectors which don't exist on the card (apparently, the current data on the thing claim it's got a capacity of 1.5 TB). I figured the way to solve this would be to boot to runlevel 1, kill udev, and run:

```
dd if=/dev/zero of=/dev/sdb bs=512 count=1
```

to clear the partition table, but... that isn't working. dd is simply giving me 'Input/output error'.

Interestingly, sfdisk is able to parse the device without locking up, but there are some I/O errors along the way:

```
$ LANG=C sudo /sbin/sfdisk /dev/sdb

Checking that no-one is using this disk right now ...

BLKRRPART: Input/output error

OK

Disk /dev/sdb: 1578585 cylinders, 64 heads, 32 sectors/track

read: Input/output error

sfdisk: read error on /dev/sdb - cannot read sector 0

sfdisk:  /dev/sdb: unrecognized partition table type

Old situation:

sfdisk: No partitions found

Input in the following format; absent fields get a default value.

<start> <size> <type [E,S,L,X,hex]> <bootable [-,*]> <c,h,s> <c,h,s>

Usually you only need to specify <start> and <size> (and perhaps <type>).

/dev/sdb1 :

/dev/sdb1          0+ 1578584  1578585- 1616471039+  83  Linux

/dev/sdb2 :

/dev/sdb2          0       -       0          0    0  Empty

/dev/sdb3 :

/dev/sdb3          0       -       0          0    0  Empty

/dev/sdb4 :

/dev/sdb4          0       -       0          0    0  Empty

New situation:

Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System

/dev/sdb1          0+ 1578584  1578585- 1616471039+  83  Linux

/dev/sdb2          0       -       0          0    0  Empty

/dev/sdb3          0       -       0          0    0  Empty

/dev/sdb4          0       -       0          0    0  Empty

Warning: no primary partition is marked bootable (active)

This does not matter for LILO, but the DOS MBR will not boot this disk.

Do you want to write this to disk? [ynq] y

read: Input/output error

sfdisk: read error on /dev/sdb - cannot read sector 0

Re-reading the partition table ...

BLKRRPART: Input/output error

If you created or changed a DOS partition, /dev/foo7, say, then use dd(1)

to zero the first 512 bytes:  dd if=/dev/zero of=/dev/foo7 bs=512 count=1

(See fdisk(8).)
```

So... is anyone familiar with this type of situation? Is it perhaps a firmware error in either the card or my card reader? What should I do?

Thanks!

----------

## roarinelk

either it's really broken (sector 0 dead) or the controller can't handle it

----------

## NeddySeagoon

Aquous,

If

```
 sfdisk: read error on /dev/sdb - cannot read sector 0 
```

is for real, then its dead.

Everything expects to be able to read sector 0.

You can use iosetup and loop mounting to get by without a partition table but its more bother than its worth.

If you can get dd to write to sector 0, you should be good to go but an incorrectly reported size is a very bad thing since the size is not stored in the writable area of the card.

----------

## Aquous

Dang it, was afraid of that. Oh well, time to contact my supplier... if he ever responds to his e-mails...

Thanks anyway.

----------

