Real Raspberry Pi - Getting Started And Custom NOOBS
Written by Harry Fairhead   
Thursday, 04 September 2014
Article Index
Real Raspberry Pi - Getting Started And Custom NOOBS
Customizing NOOBs
Common Customizations

Chapter 2 of our new ebook "Real Raspberry Pi" covers the ground that every book on the subject has to - connecting up and getting started. Unlike other accounts, this one takes you into customizing the OS with the idea of making headless operation possible. 


pibp

Real Raspberry Pi

Chapter

  1. Real Raspberry Pi - Why Pi?
  2. Getting Started And Custom NOOBS
  3. OS Images And Custom Images

Note: As of September 2014 NOOBS only comes with a single OS on the SD card - Raspbian. It still works as described here but any other operating system you choose to install is now downloaded in the same way that NOOBSLite did the job. You can still put other OS images in the os directory and have them installed - the only change is that they are no longer provided initially. 

This chapter will be updated to reflect the new NOOBS at the next edit.

First Switch On

If you know anything much about computing hardware you probably don't need a detailed "connect this wire to this socket" tutorial on getting the Pi setup.

So here are the basic facts of Pi life:

  1. You need a monitor or a TV that supports HDMI. You can get HDMI to DVI converters and these work. You can even get HDMI to VGA converters, but don't bother - spend the money on a low cost monitor with HDMI connector or just go straight to headless, see later.

  2. You need a 5V micro USB power supply that can sustain a 1Amp output. The Pi doesn't use a lot of power, less than 5W, but at 5V the current requirement is about 1A. 

  3. If you are using a model B or B+ then you can plug in a USB keyboard and mouse. 

  4. If you are using a model A then you can plug in just a keyboard - this is not a problem as it is enough to get started and configure everything to work in headless mode, see later. The only alternative is to connect a USB hub to increase the number of ports to accommodate a keyboard and a mouse or to use a keyboard that has a mouse port built in. 

  5. If you need to use any USB device or devices result in a power load of more than 1A in total you need to get a powered USB hub to connect it. The Pi can only draw 1A of power. 

  6. You can connect the model B and B+ to the network using a wire, but the model A needs a USB WiFi or USB Network connector to get on line. More about this problem later. 

  7. To boot and operate the Pi you need an SD card. The minimum workable size is 8GB and. given how cheap SD cards are, it just makes more work to try and economize. The B+ uses a micro SD card, which has the advantage of not sticking out as much. If you plan to move to the model B+ then a micro SD card and an SD adaptor is a good idea as this allows it to work in the model A, B and B+. Much has been written about which cards work with the Pi - the simple answer is that most do, but you will find the occasional non-worker.

First Switch On

OK, for your first switch on you probably need the HDMI monitor, USB keyboard, USB mouse, micro USB power supply and an SD card. Connecting up is trivial so I won't waste time going over it. 

However, once you have everything connected don't switch the Pi on and expect to see anything on the monitor - you won't. 

Most computers have a video driver in their "bios" and hence generally display at least a prompt or a splash screen when first switched on. The Pi doesn't have a firmware video driver, which means it is incapable of displaying anything when you first turn it on.

Don't conclude that your Raspberry Pi is broken when you get a blank video screen when it is turned on without a boot SD in place.

The video driver is part of the operating system and if you install a bootable SD card and switch on you will see the green LED flash indicating that the SD card is being accessed. Soon after this you should see something on the monitor. If you don't this is the time to check that the monitor is switched on, pluged in and working. 

So how do you get a bootable SD card?

You can simply buy an SD card pre-loaded and use that. 

However, if you are going to experiment you probably need to be able to create new bootable SD cards as required. So while buying a bootable card might be the easiest way to get started it is a good idea to know how to do the job yourself. 

There are two distinct ways of creating a bootable SD card. There isn't much point in going into step-by-step detail of how to do it because this resource already exists on the Raspberry Pi web site and it is likely to change - always go to the authoritative documentation. 

What is important to understand is what the two different approaches offer.

You can either manually copy an image of the operating system you want to use or you can use  NOOBS (New Out Of the Box Software). Of course, NOOBS is named to appeal to, well, noobs (i.e. beginners) but it has a simplicity that even an advanced user might appreciate and this isn't always made clear. 

Let's take a look at the NOOBS approach first and keep the disk image approach for the next chapter.

NOOBS

NOOBS contains the files that are needed to create a bootable SD for: 

  • Raspbian
  • Pidora
  • OpenELEC
  • RaspBMC
  • RISC OS
  • Arch Linux

 and probably more by the time you read this.

Most of the time you really just need Raspbian, which is essentially the standard OS for the Pi - the others you only need to consider if you have a special requirement or are just interested.

It also has the disadvantage of being a 1.4 GB zip file download, which should be compared to a 0.7 GB zip zip file for just Raspbian. However, the size of NOOBS is only twice that of a single OS image and it contains all six standard operating systems. 

You can also opt for NOOBS Lite, which is smaller than either at 20MB, but this is just the basic installer. It downloads any OS image it needs at the time of installation and this means the Pi has to be connected to the Internet, i.e. it has to be a model B or B+ connected via a network cable. Another problem is that as NOOBS Lite downloads the OS files each time they are required, it is much harder to customize its installations. 

So NOOBS proper is bigger, but you only need to download it once and its has a number of advantages:

  • you don't have to use special software to create an image file

  • you can install multiple operating systems to a single SD card and select which to boot to

  • you can easily customize the OS and the installation to make repeat installations automatic.

To make use of these features you do need to know something about how NOOBS does things but first lets take a look at how you get an OS running.

The first big advantage of NOOBS is that you don't need to create a OS image - just format the SD card.

The only slight complication is that the SD card has to be formatted as a single FAT32 partition. If you have a brand new SD card then just formatting it is usually enough. If you are reusing an SD card then you need to visit the SD Association’s website and download SD Formatter 4.0 for OSX or Windows and use it to create a single partition FAT32 disk. If you are using Linux then use gparted or parted. 

If you use SD Formatter and you find that the card wont boot then reformat the card and make sure you are using a full format with overwrite and format size adjustment on - the last on clears the existing partitions.

Once you have the SD card formatted all you have to do is unzip the NOOBS file and copy all of the files onto the SD card.

That's it - a bootable SD card simply by copying files.

About the only thing that can go wrong is that you copy the folder that contains NOOBS rather than all of the files in the that folder to the root of the SD card.

You also need to make sure that the SD card is at least 8GB because while you can fit the expanded NOOBS onto a 4GB card this doesn't leave enough free space for the program to work to create a bootable OS disk.   

NOOBS At Work

When you boot the Pi from a NOOBS card a cut down version of Linux loads and presents you with a menu of possible operating systems.

Select the one you want and a bootable image is created for you.

NOOBS re-organizes the disk to create the partitions and file structure needed to boot the operating system you have chosen.

If you recall a partition is an independent storage volume. There can be many partitions on a single physical device each behaving as if they were a separate disk drive.

What NOOBS does is to create a partition on the SD card for each OS you want to install and then copy all of the files into the new partition. 

If you set up multiple operating systems then NOOBS gives you a choice when you start the Pi up i.e. its a multiboot system.

If you only set up a single OS then the system boots to that without bothering you.  

This is good but if you don't want a multiboot system you might see the 1.4GB that you have to give to NOOBS to store all of the operating system files to be a bit of a waste - NOOBS Lite wastes much less space but as already mention isn't easy to customize. 

Again there isn't much point in going into NOOBS installation in detail but here are some facts of NOOBS life:

  • You can install NOOBS using nothing but a mouse or a keyboard - i.e. you don't need both which is good for the model A. 

  • If you use a keyboard you can navigate using the cursor keys (arrows) and enter to select. If you look at menu options you will see the key that you have to press to select it e.g. i for install.

  • If you install a single OS then next time you boot from the SD card it is this OS that is started. 

  • To get the NOOBS installer again hold down the shift key while the machine boots.

  • If you installed more than one OS then you will see the boot selector at startup allowing you to select which OS to start.

  • You can select the video output used by NOOBS by pressing the 1,2, 3 or 4 key.

<ASIN:1118795482>

<ASIN:0071807837>

<ASIN:1118555430>



Last Updated ( Friday, 19 September 2014 )