Monday, August 18, 2014
Raspberry Pi and Getting Raspbian Installed
The larger box to the right is only a USB hub.
That might have been more surprising five or so years ago, but I bring my own Big Computing Iron bias to the table.
That little box is about equivalent to my own cellphone, an ARM based computer with an A7 single core processor.
It turns out that it is just enough to do some real computing.
While I have a tablet computer that is twice as fast, and a netbook that is probably a little faster, this little critter will be put to use, creatively. I'm thinking it will make a great file server and web server. Since it uses the same environment that I am used to, Linux, all the software will be familiar to me.
No, it won't run Windows.
No, it won't run Mac OSX or iOS.
It doesn't have to. It runs Linux.
Ok, it does it a bit slowly but it runs it. That itself surprises me in a credit card sized box but hey, I'll adapt.
My good friend in Atlanta, Craig had a spare since he upgraded himself to a Beagleboard and is considering a BananaPi once it comes out, so he dropped it in a box and sent it to me with some goodies.
So far, it's kept me engaged in trying to figure it out.
First thing first, you have to get an operating system onto it. The RaspberryPi foundation says right out that they support Linux, and the flavor they support is a version of Linux called Debian, specifically "Raspbian".
Great! I know that! It works well, and I could set up a home computer with Linux that would make most people quite happy. But how to get it running?
Download Raspbian to your computer. The Raspbian distribution points you back to the download page at RaspberryPi.org where you can find a zip file of the operating system.
Inside the zip file you will find a ".img" file. That's your whole operating system. All of 806 Megs. Everything about this computer is small. Small is good.
Unzip the file you downloaded and place the .img file somewhere you can remember. You will need the tool to write it out to the Class 10 SDHC card later.
For windows, you need a program to write that to the chip. Easy. Download Win32DiskImager and install it. Unzip the download of the file somewhere you can remember, and run the installer .exe file. This is done by right clicking it and selecting "Run as Administrator".
Now that it is installed, you can run the Win32DiskImager.
You need a Class 10 SDHC chip, at least 4gb, but 8 will do nicely. Make sure that you find the mark on the chip that says it is a Class 10 - the mark is a number 10 inside of a letter C that I almost always mistake for a circle.
Place the chip in your chip reader on your computer and wait for windows to find it.
In Win32DiskImager, select the correct drive letter for the SDHC chip. This will vary per computer. I have a built in reader that puts the chip at F: and I was using an external reader that put the one I really wanted at G: so be careful. If you format the wrong chip, your data is gone forever. Really. Be careful.
At this point all you have to do is click on Write button at the bottom of the Win32DiskImager and the program will write the entire operating system to your chip. Yes, it really is that easy. The chip then becomes the hard drive for the RaspberryPi.
When Win32DiskImager is finished, safely remove the SDHC chip from the reader and place it in the chip slot in the back of the Pi. The slot is next to the power connector which is a Mini USB plug.
You must have the RaspberryPi connected to a network to receive updates, and you will also need to plug the computer into a TV in order to see what you are doing.
Connect the RaspberryPi to your wired Ethernet cable. The jack looks like a wired phone jack.
Plug the HDMI cable into a modern TV and the side of the Pi. Turn on the TV and plug in the Raspberry Pi. Find the correct HDMI channel on the TV set and you will see Debian begin to boot with a list of messages and a RaspberryPi logo at the top left of your TV screen.
The first time you run a computer, you usually see some sort of splash screen welcoming you to the computer. With the RaspberryPi, the welcome is a bit more basic. It brings up a menu that asks you to set up some basic things. Don't worry if you mess that up, you can always run the welcome screen called "raspi-config" from a terminal window in Raspbian.
You will want to do the following steps:
Expand filesystem - this will let you use your entire chip. Don't worry, it's simple, I took all the default settings.
Change User Password - It currently is "password". Change it. Your user is currently "Pi", and you can later research how to add "your user" on there, but Pi will work for now.
Enable Boot To Desktop/Scratch - You really will want to do things graphically if you are a beginner. Select "Desktop Log In As User 'pi' at graphical desktop". This is how you would expect things to run.
Internationalisation options. Remember, it is a British computer, so it is set up for British English and Keyboard. It also is confused as to where You live, so you need to reset that.
I configured mine for "en_US.UTF-8.UTF-8" which is standard for US and worked with my old school IBM Model M clicky Keyboard.
Time zone is US Eastern Time Zone and I used "America" and "New York" even though NYC is 1200 miles away.
I know it's the same time zone, cut me a break!
There is also an advanced menu that you will want to visit.
Advanced menu items I set were:
A3 Memory Split - I set 64MB for Video memory.
A7 Update - this is why you need Ethernet connected. The Raspi will go out and grab the latest update for "this" program. It's like the BIOS in your Windows computer. It is stored on the SDHC Chip and will give you some changes here and there. For example, the time set up dialogue changed to allow me to select a city instead of a specific time zone.
At this point you can Finish and you will be sent on your way to the Raspbian desktop.