Flashing the SD Card

In order to work with your Raspberry Pi you must first flash an SD card with an operating system that is able to run with the Pi. The first place to find an OS like that is here: Raspberry Pi – Downloads

This link is from the official Raspberry Pi foundation and it is always updated with the latest releases. There are other sources for OS’s too but this is not the point of this post.

Next you must check that your SD card is at least 2GB large and its supported by the RPi. In order to check the compatibility have a look here: Verified Peripherals – SD Cards
Most of the commonly available SD cards on the market are 100% supported but do verify with the previous link.

For my experiments, not only with the RPi, I am always using cards from SanDisk. Especially the SanDisk Ultra Class 10. Those are cheap, ultra fast and highly reliable!

So, now that you have verified that your SD card is greater or equal to 2GB, you have download your OS image that you want (.img file only) and your SD card is supported by the RPi it is time to move to the actually OS flashing process.


Using a Mac

Personally I am using a Mac and that why I will start from this one first. Macintosh is a Unix based system and this makes our life easier sometimes. Plug in your SD card into the onboard card reader and open a terminal window.


diskutil list

It will make a list with all the available disks in your computer/laptop like below:

You have to find the name allocated to your SD card. The best way to do that is by looking at the size section of this list. For example in my system I have a 256GB SSD (/dev/disk0), an 1TB HDD (/dev/disk1) and the last one is a disk with 7.9GB (lets make it 8GB) with the name disk2. This one is the SD card and the disk2 is the name that we want!

Now we have to unmount the card using the following command:

diskutil unmountdisk /dev/disk2

If your SD card is under a different name, for example disk1 or disk3, use the appropriate one. Pay attention to this! A mistake here could wipe out all the data of another disk!

When you execute this command you are going to see that the SD card icon on your desktop will fade and then disappear from the screen. This is an OSX animation but is always a good sigh that we have select the appropriate drive. Also at the terminal you are going to have: Unmount of all volumes on disk2 was successful.

Now locate the img file of the operating system that you are going to flash to the SD card. I have place mine into the Download folder and the name of the file is: 2014-01-07-wheezy-raspbian.img


cd Downloads

and then:

sudo dd if=2014-01-07-wheezy-raspbian.img of=/dev/disk2 bs=1m

It will prompted you for your computer/laptop administrator password. While your are typing it you are not going to see anything. This is normal. Just press Enter at the end and wait. The operation will take several minutes! This is depending from the size of the OS image, the size of the card and the dd command parameters.

You will know that everything went OK when you have something like this on your screen:

Right click on the SD card icon and Eject it. You are ready!


Using Windows


The first Boot and after (Raspbian)

After the first boot, if you have connected your Pi with an HDMI cable to your TV, you are going to see a configuration window. This window will pop up only after your first boot process. After that you are not going to see it again. In case that this in not the case (for example you are connected over SSH or serial port) or you want to change some of the settings latter on you can always type:

sudo raspi-config

and the configuration window will appear on your screen. The first thing you should do is to expand the file system in order to fill the entire SD card. Then depending of your project change the remaining settings as you need.

Have in mind that on the latest Raspbian release the SSH is ON by default so you don’t need a TV for your first boot! This is perfect as we can connect with the Raspberry Pi directly with the PC over an ethernet cable. No need for a TV and HDMI cables! Doing that we can setup WiFi connection or anything else! Have a look here for a guide about direct connection with a PC via the ethernet cable.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: