How to Install and configure Raspbian on Raspberry Pi 2 (Linux/windows/mac)

Watch the YouTube Video Here

The raspberry pi 2 was announced in February 2015 with a awesome tag of it being “6 times faster”.

With a 900 MHz quad core broadcom processor and a GB of ram, the performance is evident.

With faster boot times, (almost) no lags,and smother video performance and all this with the same price tag and form factor as its predecessor has made it a favorite among makers.

Raspbian is the official OS for raspberry pi and is quite an experience on the pi 2.It is a port of the popular Linux operating system, debian whezzy.

The following steps will work even with the older versions of raspberry pi.

How to Install and configure Raspbian on Raspberry Pi 2 Linux windows macStep 1: Gathering the Equipment

You can install Raspbian on the Pi even without a display and extra keyboard and mouse but we are going to use them anyway because it’s easier this way and most of the stuff required is most probably lying around your house.

Besides the Raspberry pi, you'll also need:

Ø A MicroSD CardThe minimum requirement is 4GB class 4 (higher the class higher the speed), the class of the card is written in a small circle on the card. Using a higher class card is recommended. I will be using SanDisk 8 GB class 10 SDHC card. The ‘HC' in SDHC means that the data on the card is written in random memory blocks (this makes them last longer). Getting this type of card is a good idea for the Raspberry.

Ø A keyboard and MouseMost of the wired and wireless (the ones with the wireless dongle not the Bluetooth ones) keyboard and mouse work fine with the pi. I will be using Logitech wireless keyboard and mouse pair.

Ø A Display and Respective CableAny Display with HDMI or RCA (the ones with the red, yellow and white cable) input work nicely with the pi. If you wish to use a display with VGA input (like me), then you can use a HDMI to VGA converter cable.

Ø A 5V Power Adapter 600mA is the minimum requirement but using a 1 to 1.5 Ampere power adapter is recommended. I will be using a 1.2A adapter.

Ø LAN Connection or WIFI Dongle (optional) Internet Connectivity is optional while using the setting up the pi but is recommended to keep the software up-to-date. I will be using a Netgear Wi-Fi dongle.

Step 2: Preparing The SD card

NOTE: Many things can go wrong in this step (especially for Linux and Mac OS users), so follow the steps carefully!!

There are steps listed for Windows, Linux as well as Mac users

The raspberry pi doesn’t have any Flash Memory thus the Operating System and all the related files need to be on the MicroSD Card.

If you face any problems refer the last step for troubleshooting.

For Windows Users:

First of all download the Raspbian image zip from here.

To unzip the zip file you can use one of these tools:

  1. Unzip the img file to a suitable location.
  2. Download the Win32 Disk Imager from here and install it.
  3. Insert your MicroSD card into the PC and format it. (right click the sd card in the windows explorer and click format)
  4. Close all windows explorer/file explorer windows as well as any music players running in the background. This step is essential for windows 7 users because these programs can lock the SD card and you may not be able to write to it.
  5. Start the Win32DiskImager.
  6. Select the correct drive letter for the SD card (you can check this in the windows explorer).
  7. Choose the .img file from the location you extracted it to by clicking the file icon.
  8. Click write. It might take a couple of minutes to finish writing.

After its finished writing you can safely eject the card and proceed to the next step.

For Linux Users:

First of all download the Raspbian image zip from here.

Don’t insert the SDcard yet!!!

If you don’t already have a unzip tool you can get it by typing the following command in the terminal

apt-get install unzip

Now to unzip the file open the terminal and type the following command

unzip /directory/path/20xx-xx-xx-raspbian-wheezy.zip

Do remember to change ‘/directory/path/’ with the location of the zip file and replace ‘20xx-xx-xx-raspbian-wheezy.zip’ with the name of the zip. At the time of writing the name was ‘2015-05-05-raspbian-wheezy.zip’

  1. Now run the following command

df -h

  1. A list of mounted devices should come up, make a note of these.
  2. Now insert your sd card and run the df -h command again. The new device that has appeared is your SD card. The left column gives the device name of your SD card; it will be listed as something like /dev/mmcblk0p1 or /dev/sdd1. The last part (p1 or 1 respectively) is the partition number. Note down the card’s name.
  3. Run

umount /dev/sdd1

replacing ‘sdd1’ with whatever your SD card's device name is (including the partition number).

  1. Now to copy the image file to the SD card run the following command

sudo dcfldd bs=4M if=/directory/path/20xx-xx-xx-raspbian-wheezy.img of=/dev/sdd

please note to replace ‘/directory/path/’ with the location of the .img file and replace ‘sdd’ with the name of your SD card(without the partition number).

When the image is done writing you can safely eject the SD card and proceed to the next step.

For Mac OS Users:

First of all download the Raspbian image zip from here.

Don’t insert the SD card yet!!

To unzip the zip file go to /System/Library/CoreServices and double click the ‘Archive Utility’ to open the app and follow the following steps.

  • Select File and click Expand archive.
  • In the window that opens navigate to the place where you downloaded the zip file.
  • Select the .zip file click the Expand button.
  • Close the utility when the file is done expanding.

Now to write the image to the SD card follow the following steps:

  1. Run the command

diskutil list

Make note of the disks mounted

  1. Now insert your SD card and rerun the diskutil list command.
  2. Identify the disk (not partition) of your SD card(it’s the new disk that appeared in the list above) e.g. disk4 (not disk4s1)
  3. Now run the following command

diskutil unmountDisk /dev/disk#

Replace ‘disk#’ with the name of your SD card (without the partition) e.g. diskutil unmountDisk /dev/disk4

  1. To write the image to the SD card run the following command

sudo dd bs=1m if=/directory/path/20xx-xx-xx-raspbian-wheezy.img of=/dev/disk#

Note to replace ‘/directory/path/’ with path of the .img file and replace ‘20xx-xx-xx-raspbian-wheezy.img’ with the name of the .img file (at the time of writing it was 2015-05-05-raspbian-wheezy.img) also replace ‘disk#’ with the name of your SD card (without the partition).

  1. You can check the progress by pressing Cmd+T

After its done writing you can safely eject the card and proceed to the next step.How to Install and configure Raspbian on Raspberry Pi 2 Linux windows mac schematich

Step 3: Completing the Computer

Though the Raspberry Pi is called a computer, it itself can’t run. It needs a couple of IO devices.

1. Insert the MicroSD card (now with Raspbian written on it) into the card slot at the bottom of the Pi.

2. Plug in your USB keyboard and mouse or the wireless receiver for you wireless keyboard and mouse.

3. Plug in the LAN cable into the Ethernet port or the USB Wi-Fi dongle.

4. Plug in your HDMI cable or RCA cable for analog display in the 3.5 mm jack.

5. Plug in the MicroUSB cable from the power adapter. The Pi doesn’t have a power switch, it will turn on as soon as you plug in power.

 

 

For more detail: How to Install and configure Raspbian on Raspberry Pi 2 (Linux/windows/mac)


About The Author

Ibrar Ayyub

I am an experienced technical writer with a Master's degree in computer science from BZU Multan University. I have written for various industries, mainly home automation and engineering. My writing style is clear and simple, and I am skilled in using infographics and diagrams. I am a great researcher and am able to present information in a well-organized and logical manner.

Follow Us:
LinkedinTwitter
Scroll to Top