Making a SD card for the Raspberry Pi from an image with ddrescue.

ddrescueOn GNU/Linux :

The SD card may be presented on any device like /dev/sdx so use on the Terminal the command lsblk  or sudo fdisk -lu to check.


sudo apt-get install gddrescue xz-utils
unxz myimage-raspberry-pi.img.xz
sudo ddrescue -D --force myimage-raspberry-pi.img /dev/sdx


On MacOSX :

On MacOsx you’ll need a real package handler aka : brew !

  1. Press Command+Space and type Terminal and press enter/return key.
  2. Run in Terminal app:

    ruby -e "$(curl -fsSL" < /dev/null 2> /dev/null

    and press enter/return key. Wait for the command to finish.

  3. Run:
    brew install ddrescue
  4. Search where is your SD card device with diskutil list
  5. Then use it :
sudo ddrescue -D --force myimage-raspberry-pi.img /dev/diskx