2

I have a samsung evo+ microSD card used on my HTC m10 which seems to be corrupted few days back. After several failed attempts to dd it to my local disk then dd it back to newer sdcard, I went and bought newer Sandisk 128GB microSD card and attempted to dd it

after several hours this happened:

dd if=/dev/mmcblk0 of=/dev/sdd status=progress
127863939584 bytes (128 GB, 119 GiB) copied, 34160 s, 3.7 MB/s  
dd: writing to '/dev/sdd': No space left on device
249737217+0 records in
249737216+0 records out
127865454592 bytes (128 GB, 119 GiB) copied, 34171.2 s, 3.7 MB/s

they are supposed to be both 128GB cards, not sure why this is happening? fdisk -l output shows the following:

Disk /dev/mmcblk0: 119.8 GiB, 128579534848 bytes, 251131904 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 0E47F670-C4DD-476D-BB0E-EB53A31FD907

Device         Start       End   Sectors   Size Type
/dev/mmcblk0p1  2048     34815     32768    16M unknown
/dev/mmcblk0p2 34816 251131870 251097055 119.7G unknown


GPT PMBR size mismatch (251131903 != 249737215) will be corrected by w(rite).
Disk /dev/sdd: 119.1 GiB, 127865454592 bytes, 249737216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device     Boot Start       End   Sectors   Size Id Type
/dev/sdd1           1 251131903 251131903 119.8G ee GPT

what I'm missing?

3
  • 3
    "128 GB" refers to the flash chip raw capacity. Out of this raw capacity, a part is set aside for use by the microcontroller for purposes of wear leveling and garbage collection. This is very common and expected. The two cards use different firmware which reserves different amounts; the end result is that the usable capacities are different.
    – AlexP
    Nov 30, 2017 at 5:27
  • so not possible to format it in any other way to use the real size of the 128GB that was supposed to have? Dec 2, 2017 at 22:10
  • It has 128 GB, but some of this capacity is used by the microcontroller for essential functions. You cannot use more that what the microcontroller reports as usable capacity.
    – AlexP
    Dec 2, 2017 at 23:15

1 Answer 1

4

dev/sdd is a little bit smaller than /dev/mmcblk0, that's the culprit, take a look at the disk size:

Disk /dev/mmcblk0: 119.8 GiB, 128579534848 bytes, 251131904 sectors
Disk /dev/sdd:     119.1 GiB, 127865454592 bytes, 249737216 sectors
1
  • Thanks for pointing it out, both brands says 128GB and i thought its identical in size, but seems @AlexP's comment above clarifies it Dec 2, 2017 at 22:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .