Saturday, April 4, 2015

Day 1: Installation



Download the Linux image for Raspberry Pi (I use Raspbian)


https://www.raspberrypi.org/downloads/

Raspbian-Download-Page
Raspbian Download Page

Then follow the installation instructions:

Windows users

Linux Users

Since I use Linux to image the SD card, so this is what it is going to look like:

1. Checksum check if the file is intact.

sha1sum 2015-05-05-raspbian-wheezy.zip
cb799af077930ff7cbcfaa251b4c6e25b11483de

Compared with the number on 'download' page and the digest value is the same.

2. Check how my system detects sd card. 

First 'df -h' without sd card installed

Output withot sd card
Output without SD Card

Then insert sd card and  repeat the same command:

Output with SD Card Inserted

My system mounts sd card as: /dev/mmcblk0p1.

3. Unzip the image downloaded:

unzip 2015-05-05-raspbian-wheezy.zip 

4. Unmount sd card

umount /media/jaro/D681-1D95

5. Using 'dd' copy the image onto the sd card (make sure you use the whole partition of the card - here: /dev/mmcblk0)

sudo dd bs=4M if=2015-05-05-raspbian-wheezy.img of=/dev/mmcblk0

It will take a while to copy image and nothing shows on the screen during that time. Just give it a time.

6. Insert sd card into Raspberry PI and connect to your TV set.

Once my Raspberry PI is hooked up to the TV set

A tool called 'raspi-config' is the first thing that is greeting me. It can be invoked at any point from CLI (command line interface) using the following command: 

$ sudo raspi-config


all information on raspi-config can be found at: http://elinux.org/RPi_raspi-config


Avoiding too much deliberation I arrive with the following settings:


Option 1: Expand Filesystem
This allows system to see and use the whole SD Card.

Option 2: Change User Password.
I have changed default password (defaults: user=pi, password=rasbberry)

Option 3: Enable Boot to Desktop/Scratch
-----> Console Text console, requiring login (default)
In case I wanted Graphical User Interface (GUI) I can always type:

$ startx



Graphical User Interface is pretty and makes simple task simple. But my goal is to discover the full power of this little computer and Linux. This is why I will be using SHELL most of the time.

Option 8: Advanced Options
-----> A3Memory Split
(How much memory should the GPU have)? 32
Since I don't use GUI, 32 MB should do.

-----> A4: SSH (in order to be able to log on to PI from other computers (putty etc.)

If I don't like them I can change them anytime I want by invoking the tool again. 

The last thing I want to do is to make sure that IP address of my Raspberry PI has a static IP address rather than using DHCP server. It will make my ssh access much easier later.

I edit the file in which system keeps the information about IP settings (I'm choosing IP address that is not part of DHCP in my network (A.B.C.D are values used in my home network):

$ sudo nano /etc/network/interfaces





iface eth0 inet static
        address A.B.C.D
        netmask 255.255.255.0
        network A.B.C.0
        broadcast A.B.C.255
        gateway A.B.C.254

Content saved with CTRL-x / save


(Note: learn VIM text editor. It's usage is more difficult but gives more power as well).

And...
IT'S ALIVE



Welcome home little buddy!