0
1
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
: typefile $(which dd)
to check. – AFH – 2016-05-18T12:34:28.637Looks 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 – 2016-05-18T12:40:06.503May or may not relevant to your problem, but bs=512M is silly. Something like 4k or 1M would be good. – Tom Yan – 2016-05-18T13:10:13.930
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 – 2016-05-18T13:13:42.127
SD cards are common targets of forgeries, are you sure the card is genuine? You can verify it with F3 http://oss.digirati.com.br/f3/
– acejavelin – 2016-05-18T13:16:01.917I tried f3 and it passed fine. This is some kind of mistake on my end and I can't understand what. – Noufal Ibrahim – 2016-05-18T13:25:08.477
I am slightly confused: are you saying that you can copy to
/dev/sdb1
, but not to/dev/sdb
? Even after formatting withgparted
? – AFH – 2016-05-18T15:59:26.520Yes. That's what confusing me. – Noufal Ibrahim – 2016-05-19T03:50:49.267