Here you can find the instructions on how to write the operating system’s .img file to a micro-SD card (8GB minimum), suitable for booting a Raspberry Pi microcomputer.
After having extracted the .img file from the downloaded ZIP archive, just follow your operating system-specific directions below. A good SDHC class 10 card is highly recommended.
Make use of a micro-SD to USB key adapter for the write process.
Writing from a Linux operating system
Linux users can make use of dd.
Run all the following commands as root or with sudo in a terminal emulator:
- plug the SD card into your PC;
fdisk -lfor locating the device file, for example: /dev/sdx (change for your case);
- it’s better to unmount the auto-mounted device’s partitions, if any (
umount /dev/sdx2, …);
- finally write the image:
dd if=path/to/imageFile.img of=/dev/sdx bs=50M
- please note that the dd command must refer to the whole disk: do not use /dev/sdx1 but /dev/sdx, as an example.
Plug the SD card into your computer and launch Win32DiskImager/Etcher; now load the .img file and write it to the card – verify that the letter of the device selected corresponds with that assigned to the SD card. Press the Write/Flash button for starting the write process.
Please note that it is not rare that the latest build of Windows 10 (Creators Update) gives permission/write errors when dealing with already multi-partitioned USB devices. Don’t worry, it’s just Windows: retry until success.
Writing from Apple OS X
Being a UNIX-like operating system, OS X users can make use of dd as the Linux people, but also use Etcher, which could be simpler for novices.
For Etcher, plug the SD card into your computer and launch Etcher; now load the .img file and write it to the card. Press the Flash button for starting the write process.
For dd, run all the following commands in the terminal application (Applications, Utilities, Terminal):
- plug the SD card into your computer;
diskutil listfor locating its device file. Your terminal output will look something like this:
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *500.1 GB disk0
1: EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 499.8 GB disk0s2
#: TYPE NAME SIZE IDENTIFIER
0: FDisk_partition_scheme *8.0 GB disk1
1: DOS_FAT_32 USB 8.0 GB diskXs1
disk0 being your machine’s harddrive and diskX being your SD card. Be sure you know what disk is the right one: eject the disk properly, run the command again, and see which disk is not showing now, but was showing earlier. The missing one is your SD drive.
- plug again the card into your computer;
- now unmount the SD card with the following command:
diskutil unmountDisk /dev/diskX;
- finally wtite the image:
dd if=path/to/imageFile.img of=/dev/diskX
Thanks to Antti Koponen.
Once you have successfully written the IMG file to the micro-SD, plug the card into the R-Pi and reboot the microcomputer.
- Louis DeRobertis reports that some HDMI to VGA converters do not give enough power to the screen – it will remain blank.
- Never halt or reboot the Pi by powering it off (some Raspberry Pi boards are reported to be prone to filesystem corruption); use SSH instead (with the
You can of course schedule a cronjob which will turn off or reboot the Pi gracefully as well.