Raspberry Pi 2 Setup

Posted by admin on Mar 8, 2015


rpi2_setup_post_image.jpg

Overview:

In this guide we will look at how to install an operating system on the Raspberry Pi (RPi). We will download and extract the latest NOOBS files, then copy them to a micro SD card before setting the Raspberry Pi with Raspbian. We will also look at how to install other image files. This guide and others on this site will often abbreviate 'Raspberry Pi' as 'RPi'.

You will need...

Hardware:

Raspberry Pi 2 (Model B+)
MicroSD Card (no smaller than 4GB) - If you are buying an SD card for using with your BBB it's worth getting a class 10 card for the little bit of extra cost.
MicroSD Card reader - I've been using a cheap generic USB card adapter.
USB keyboard & mouse
5v power supply for Raspberry Pi
HDMI cable
HDMI compatible monitor or TV

Software:

NOOBS - New Out Of the Box Software for Raspberry Pi
SDFormatter - for formatting your SD card

Extra:

7zip (compression/extraction software) - for extracting the image file.
Win32DiskImager (imaging utility) - for imaging to SD card.

1. Download the latest NOOBS files

There are many different operating systems and distributions that can run on Raspberry Pi and other Arm devices, but for now as a starting point we will use NOOBS (New Out Of the Box Software) to install Raspbian (RPi version of Debian).
NOOBS is software designed to let you easily download, install and configure multiple operating systems on your raspberry pi. You can download the NOOBS zip file from the downloads section of the official Raspberry Pi website here: http://www.raspberrypi.org

2. SD Card SETUP

Insert your SD card and card reader then download SDFormatter from here and run it. You should see the following screen:

sdformatter_01.gif


Next to 'Drive' Select the drive letter for your SD card. (!Important! - This will erase the contents of the drive so make sure you are selecting the correct device) Unless you want to make any other changes to the options go ahead and click 'Format' and wait for the process to complete.
When this is complete you should be able to browse to 'My Computer' with windows explorer and open the newly formatted blank SD Card. Next open up the Noobs zip file you downloaded earlier and copy all of it's contents over onto the blank SD card. Once complete safely eject and remove the SD card.

3. NOOBS SETUP

While the power is disconnected from your Raspberry Pi, connect the HDMI to the monitor and Rpi, USB keyboard and mouse, and insert the micro SD card. After all of these are connected plug in the power cable.
Your device will boot up and when the device has finished loading you will see the NOOBS installer screen:

This shows you the different operating systems that can be installed with the NOOBS software. For the latest version of NOOBS at time of writing (v1.4.0) these operating systems are supported:

Arch (Raspberry Pi port of Arch Linux for Arm)
OpenELEC (a media centre system)
Pidora (Raspberry Pi version of Fedora)
RaspBMC (a media centre system)
Raspbian (Raspberry Pi version of Debian Recommended)
RiscOS (Raspberry Pi version of Risc0S)

Some are included in the NOOBS files and can be installed from the SD card (the ones with SD card icons next to them) whereas others need to be downloaded before they can be installed.
You can install more than one of these but for now we just want to install Raspbian so check the box next to 'Raspbian' and click the 'install' icon at the top left of the menu. Unless you have any errors such as not enough free space on your sd card this will begin the installation process. When the installation is complete you will get an option to select which OS to boot - select Raspbian.
The device will reboot and load the Raspberry Pi Software Configuration Tool which we will look at in the next step.

4. RASPBERRY PI SOFTWARE CONFIGURATION TOOL

The software configuration tool allows us to easily make some configuration changes that would maybe take a little more time and effort to setup later on. We don't need to change anything to get started so you can select 'Finish' at the bottom of the screen and reboot before skipping to Step 4 of this guide, unless you want change the configuration. As seen in the menu, here are the options and a quick breakdown of what they are for:

1 Expand Filesystem Ensures that all of the SD card storage is available to the OS
2 Change User Password Change password for the default user (pi)
3 Enable Boot to Desktop/Scratch Choose whether to boot into a desktop environment, Scratch, or the command line
4 Internationalisation Options Set up language and regional settings to match your location
5 Enable Camera Enable this Pi to work with the Raspberry Pi Camera
6 Add to Rastrack Add this Pi to the online Raspberry Pi Map (Rastrack)
7 Overclock Configure overclocking for your Pi
8 Advanced Options Configure advanced settings
9 About `raspi-config` Information about this configuration tool

1 Expand Filesystem:
We don't need to expand the filesystem to use the whole of our SD card as NOOBS does this for us.

2 Change User Password:
To setup a password select option 2 'Change User Password' from the menu and confirm 'OK'. You will now need to enter your new password twice to confirm before being returned to the menu.

3 Enable Boot to Desktop/Scratch:
To change the boot options select option 3 'Enable Boot to Desktop/Scratch'. You can now select whether to boot to command line, desktop or Scratch (a programming environment).

4 Internationalisation Options:
This option lets us set the locale, timezone, and keyboard layout we are using.

As this is a quick setup, the other options are not covered in this tutorial.

Select 'Finish' at the bottom of the screen and then select 'Reboot' from the next message box.

5. Starting Raspbian

Depending on your boot settings from the previous menu if you changed them, you will boot either into the command line console, the Raspbian desktop, or the Scratch programming environment.
If you booted to command line and want to open the Raspbian desktop, type the following command and hit enter: 

	startx    

6. SAFELY SHUTTING DOWN THE SYSTEM

To shutdown from desktop, open the menu at the top left of the screen and select 'Shutdown'
To shutdown from command line, type the following command and hit enter: 

	sudo shutdown -h now

The system should now shutdown and power off and it is safe to unplug the power without risk of corrupting the file system.

7. INSTALLING FROM OTHER IMAGE FILES

Other operating systems and environments you may want to install on your RPi can require you to download an image file (.img) and image copy the contents to your sd card, so this requires a slightly different process to using NOOBS.


For installing image files we will need to download the image file. This can sometimes come compressed and the .img will need to be extracted. We can use the 7zip software for this purpose (see extra links in the overview).
Once you have your image file (with the extension .img) we will need to copy it's contents onto our SD card. We can do this by using the tool Win32DiskImager (see extra links in the overview).
Install Win32DiskImager and open up the software. You should see a screen similar to this:


win32diskimager_01.gif


Under 'Image File' browse to the image file that you wish to use. Under 'Device' use the drop-down box to select your card reader containing the microSD card that you wish to image (!Important! - This will erase the contents of the drive so make sure you are selecting the correct device) Make sure the image and device selected are correct and then click the 'Write' button. (You may get an error about writing to SD cards but you can ignore this) The process may take a while. When the process is complete close Win32DiskImager and safely eject the sd card / reader from the pc.


Insert this card into the Rpi as described earlier in this post and power up the device. Depending on the operating system image you are installing the setup process will vary and so is not covered here.


That's it for this guide. Hopefully this has got you started on using the Raspberry Pi without any issues.
Please check out future posts for guides to using and setting up other features on Raspberry Pi.


Loading Conversation