I have a somewhat weird situation I'm trying to dd an OS image (something which I dd'ed off a card earlier) onto an SD card.

The card capacity is 8GB and the image was made off an SD card of similar capacity. This is on linux. The image has 2 partitions (/ and /boot). The SD card when inserted is available on /dev/sdb. I'm trying to dd the image back onto the card using dd. The command looks like dd if=image of=/dev/sdb bs=512M. However, the command fails after 2GB is transferred saying that the disk is out of capacity.

If however, I do mkfs.ext4 on /dev/sdb with a size of 7GB and then recreate the partition table using gparted and create an actual /dev/sdb1, I can successfully dd the image back onto this partition without any problem.

Why is the 2GB error message coming up? And how do I dd the image onto the card?

  • It looks as though you are using a 32-bit dd: type file $(which dd) to check. – AFH May 18 '16 at 12:34
  • Looks like it's 64 bit. ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32 – Noufal Ibrahim May 18 '16 at 12:40
  • May or may not relevant to your problem, but bs=512M is silly. Something like 4k or 1M would be good. – Tom Yan May 18 '16 at 13:10
  • This was just one of the things I tried. The basic problem is that regardless of the block size, I still get the 2G problem and I don't know how to analyse it. – Noufal Ibrahim May 18 '16 at 13:13
  • SD cards are common targets of forgeries, are you sure the card is genuine? You can verify it with F3 oss.digirati.com.br/f3 – acejavelin May 18 '16 at 13:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.