MB6RI.co.uk
YSF - GB WIRES-XUK
44233 WIRES-X room

Imaging to SD-card

WIRES-X help and information

Created with Sketch.

For copying pi-star to SD card


Windows

Win32DiskImager

  • Insert the SD card into your SD card reader. You can use the SD card slot if you have one, or an SD adaptor in a USB port. Note the drive letter assigned to the SD card. You can see the drive letter in the left hand column of Windows Explorer, for example G:
  • Download the Win32DiskImager utility from the Sourceforge Project page as an installer file, and run it to install the software.
  • Run the Win32DiskImager utility from your desktop or menu.
  • Select the image file you extracted earlier.
  • In the device box, select the drive letter of the SD card. Be careful to select the correct drive: if you choose the wrong drive you could destroy the data on your computer’s hard disk! If you are using an SD card slot in your computer, and can’t see the drive in the Win32DiskImager window, try using an external SD adaptor.
  • Click ‘Write’ and wait for the write to complete.
  • Exit the imager and eject the SD card.

Mac OS


(Mostly) graphical interface

balenaEtcher is typically the easiest option for most users to write images to SD cards, so it is a good place to start. If you’re looking for more advanced options on Mac OS, you can use the built-in graphical and command line tools below.

Note: use of the dd tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below, you could delete your primary Mac OS partition. Please be careful.

  • Connect the SD card reader with the SD card inside. Note that it must be formatted as FAT32.
  • From the Apple menu, choose ‘About This Mac’, then click on ‘More info…’. If you are using Mac OS X 10.8.x Mountain Lion or newer, you will then need to click on ‘System Report’.
  • Click on ‘USB’ (or ‘Card Reader’ if you are using a built-in SD card reader), then search for your SD card in the upper right section of the window. Click on it, then search for the BSD name in the lower right section. It will look something like diskn where n is a number (for example, disk4). Make sure you take a note of this number.
  • Unmount the partition so that you will be allowed to overwrite the disk. To do this, open Disk Utility and unmount it. Do not eject it. If you eject it, you will have to reconnect it. Note that on Mac OS X 10.8.x Mountain Lion, ‘Verify Disk’ (before unmounting) will display the BSD name as /dev/disk1s2 or similar, allowing you to skip the previous two steps. Note down the number that appears after ‘disk’, in this case the number ‘1’.
  • From the terminal, run the following command:
sudo dd bs=1m if=path_of_your_image.img of=/dev/rdiskn conv=sync

Remember to replace n with the number that you noted before!

This will take a few minutes, depending on the image file size. You can check the progress by sending a SIGINFO signal (press Ctrl+T).

  • If this command fails, try using disk instead of rdisk:
sudo dd bs=1m if=path_of_your_image.img of=/dev/diskn conv=sync

This will take a few minutes, depending on the size of the image file. To check the progress, open Activity Monitor, click the Disk tab and find the process with the name dd. If dd is not in the list, you may need to select ‘All Processes’ from the View menu. The Bytes Read column will display the amount of data that has been read from the image. Compare that to the file size of the image to determine progress

Command line (mac)

If you are comfortable with the command line, you can write the image to an SD card without any additional software. Open a terminal, then run:

diskutil list

Identify the disk (not the partition) of your SD card, e.g. disk4, not disk4s1

Unmount your SD card by using the disk identifier, to prepare it for copying data:

diskutil unmountDisk /dev/disk<disk# from diskutil>

where disk is your BSD name e.g. diskutil unmountDisk /dev/disk4

Copy the data to your SD card:

sudo dd bs=1m if=image.img of=/dev/rdisk<disk# from diskutil> conv=sync

where disk is your BSD name e.g. 

sudo dd bs=1m if=2019-07-10-raspbian-stretch.img of=/dev/rdisk4 conv=sync

This may result in a dd: invalid number '1m' error if you have GNU coreutils installed. In that case, you need to use a block size of 1M in the bs= section, as follows:

sudo dd bs=1M if=image.img of=/dev/rdisk<disk# from diskutil> conv=sync

This will take a few minutes, depending on the image file size. You can check the progress by sending a SIGINFO signal (press Ctrl+T).

If this command still fails, try using disk instead of rdisk, for example

sudo dd bs=1m if=2019-07-10-raspbian-stretch.img of=/dev/disk4 conv=sync

or

sudo dd bs=1M if=2019-07-10-raspbian-stretch.img of=/dev/disk4 conv=sync

After the dd command finishes, eject the card:

sudo diskutil eject /dev/rdisk<disk# from diskutil>

Linux

Debian

  1. Insert your SD card into your computer.
  2. Locate the device, by running sudo fdisk -l. It will probably be the only disk about the right size. Note down the device name; let us suppose it is /dev/sdx. If you are in any doubt, remove the card, run sudo fdisk -lagain and note down what disks are there. Insert the SD card again, run sudo fdisk -l and it is the new disk.
  3. Unmount the partitions by running sudo umount /dev/sdx*. It may give an error saying the disk isn’t mounted – that’s fine.
  4. Copy the contents of the image file onto the SD card by runningsudo dd bs=1M if=your_image_file_name.img of=/dev/sdxOf course, you’ll need to change the name of the image file above as appropriate.

Warning! There is a significant risk of damage to your filesystem if you use the wrong /dev/sdx. Make sure you get it right!