[Solved] Configuring Raspberry Pi

Parts:

  1. Raspberry Pi 2 Model B
  2. SanDisk microSDHC card 16GB

I run the following command:
sudo dd bs=1m if=~/Downloads/emlid-raspberrypi2-raspbian-rt-20150401.img of=/dev/rdisk2
dd: /dev/rdisk2: Invalid argument
813+1 records in
813+0 records out
852492288 bytes transferred in 172.337112 secs (4946655 bytes/sec)

However, I am not seeing an OS when plug the card into the Raspberry Pi. Any ideas on what is wrong here?

Hello,

dd: /dev/rdisk2: Invalid argument

This message indicates that there is no rdisk2 and thus the image was not written on it. Seems like that is not the disk corresponding to sd card.
Are you using Mac OS X?

Yes. I am using Mac OS X. I fixed that issue:

sudo dd bs=1m if=~/Downloads/emlid-raspberrypi2-raspbian-rt-20150401.img of=/dev/disk2
813+1 records in
813+1 records out
852900468 bytes transferred in 421.937446 secs (2021391 bytes/sec)

But I am not able to get the disk to boot into an OS. After I get to this stage, the MicroSDHC card doesn’t seem to work. Is there something wrong with the image?

Is there anyone that can help me with this issue?

852900468 seems like the wrong size, it should be ~3GB. Try to re-download image, unpack and write it again.
I’m pretty sure that the image is fine, it has been in use for a long time.

1 Like

You were right! a re-download and extraction seemed to do the trick:

$ sudo dd bs=1m if=~/Downloads/emlid/emlid-raspberrypi2-raspbian-rt-20150401.img of=/dev/disk2
3150+0 records in
3150+0 records out
3303014400 bytes transferred in 1700.119496 secs (1942813 bytes/sec)

Also don’t forget to flush your os’ IO buffers before removing the device when doing raw write operations directly to the block device. Even if the command is finished it is not ensured that all data actually got written to the device in the same moment. Under linux the command is “sync”, don’t know for OS/X but most likely it is the same.

1 Like