Raspberry Pi Basic Configuration

The Raspberry Pi is a small Linux computer designed to help children learn programming. Being a full Linux System, it can also be used as a server or as the basis for various projects.

Here are some adjustments you might want to make to a new Raspberry Pi. The examples refer to a Raspberry Pi Model “B” bought from UK distributors New IT in February 2013. But they are pretty universal.

Once the basic Pi setup is complete, there are many things you can do with a Pi, for example create a simple website or host your own blog.

Raspberry Pi Configuration

After the Pi boots up you may see the “Raspi-config” screen, a simple configuration menu. If not, you can get to the screen by typing “sudo /usr/bin/raspi-config” at the terminal. Rasp-config looks like this:

Screenshot - 130413 - 15:12:49

Select the following items:

1. Change the password for ‘pi’ user. Select this option, follow the instructions, type a sensible password (twice) that you will remember.

2. expand_rootfs. It is desirable to enlarge the root file system to fill the whole SD card supplied with the Pi. For example, Raspberry Pis supplied as part of a New IT bundle come with an SD card of size 4 Gb or larger. But the file system contained on the card is only 2 Gb or a bit smaller. To make use of all that space, run the raspi-config programme again and select the expand_rootfs option. Follow the instructions and reboot the system when asked to do so. When the system boots, there will be a short delay while the file system is expanded, along with some messages like this:

Starting resize_2fs_once: resize2fs 1.43.5 (29-Jul-2012)
Filesystem at /dev/mmcblk0p2 is mounted on /; on-line resizing required

It will complete in 5 – 10 minutes or less.

3. Enable ssh server. Having ssh enabled will allow you to access the Raspberry Pi from your other computers. Select the option, follow the instructions to enable the ssh server. Afterwards, you can log in to the Pi with ssh (from Linux) or putty (or similar) from Windows.

That’s enough of Raspi-config for now. The following changes are made using the terminal…

Fix up the TV Output

If you connect the Pi to an old-fashoned (CRT) TV and see only black and white output, you are probably seeing an NTSC image. UK users should change that to PAL (the UK TV standard) as follows:

Edit the file /boot/config.txt and set sdtv_mode to “2”. That is, change this line:

sdtv_mode=0

to

sdtv_mode=2

And reboot the Raspberry Pi. US users should leave it as 0. For more info, see http://elinux.org/RPiconfig

Fix up TV Picture Size

If using an old fashioned (CRT) TV, you may see that the edges of the display are invisible because the picture is too big. If so, edit /boot/config.txt again. Change this line

#disable_overscan=1
to
disable_overscan=0

and reboot the Pi. You should see the whole picture now.

Fix up HDMI Output

If you are using a monitor with the Pi, it is desirable to use the right resolution. For example, these config.txt settings set the resolution to 1680×1050 at 60 Hz, just right for my HP w2007 monitor:

hdmi_group=2
hdmi_mode=58

Use an hdmi_mode number right for your resolution. See http://elinux.org/RPiconfig for a list of hdmi_mode numbers.

Set the Right Time

Set the Raspberry Pi clock to the right time as follows. At a terminal, check the time using the date command:

pi@raspberrypi ~ $ date
Sat Jan 10 03:17:02 UTC 2009

If the date/time is wrong, correct it. This time you need to use sudo because setting the time requires “root” rights:

pi@raspberrypi ~ $ sudo date 0413144913
Sat Apr 13 14:49:00 UTC 2013

That long number has the following format: MMDDhhmmYY – month month, day day, hour hour, minute minute and year year.

Update to Latest Software

Finally, update your Raspberry Pi with the latest software as follows

pi@raspberrypi ~ $ sudo apt-get update
.
.
.
pi@raspberrypi ~ $ sudo apt-get upgrade dist
.
.
.
Need to get xxxxx Mb of archives.
After this operation, yyyy Mb of additional disk space will be used.
Do you want to continue [Y/n]? y
.
.
.

(type “y” when asked)

The first command will take about 2 minutes to run. The second will take up to 90 minutes to complete.

Use the same pair of commands at regular intervals (maybe once a week or every few weeks) to keep your Raspberry Pi up to date. It takes a long time the first time but only a few minutes after that.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.