- Blog entry posted in 'The Personal Pi', January 14, 2014.
Hello everyone!
Just another in-between post before I continue with the Personal Pi project. In my last post I explained basically what the Raspberry Pi is and what all of the connections are for. Before I resume building the Personal Pi though, I would like to get my Pi up and running, and I figured I would write an entry about how to get a Raspberry Pi set up for the first time.
In order to flash the Raspberry Pi you'll need only three things: The Pi, a 4GB+ SD card, and a computer with an SD card reader/writer. You'll need to download two things from the internet onto your computer. The first is the Win32 Disk Imager utility. This is a 5.7MB download that will allow you to load your OS image onto the SD card. The second thing you need to download is the operating system image file. There are several options, but for this tutorial I'll be using Raspbian Wheezy. Any images can be acquired from this site. It may also be a good idea to download a checksum utility to ensure your operating system download was not corrupted. A commonly used utility is the MD5 & SHA Checksum Utility. It is a 77KB download so it should be almost instant. What does this utility do? If you look at the image below, just underneath the torrent link you will find a long string of characters with the label "checksum". After running the Checksum Utility, compare the returned strings of characters to ensure they match. If they do not match, then it means the download was corrupted and should be re-downloaded.
83478
Now, the OS images are much larger files than the disk imager, and may take quite a while to download depending on your internet speed. Mine took about an hour, though I only have 3Mb/s service.
The disk imager and OS image downloads come in ZIP files, so you will need to extract them before continuing. The Checksum Utility is just an executable file.
Before continuing I am going to run the Checksum Utility. Simply click the executable file. and the following screen will appear:
83480
Click "Browse" and navigate to where your image zip file is saved and double-click it. Do NOT select your img file, as this will give you a different hash. Then, copy the SHA-1 Checksum string from the Raspberry Pi downloads page and copy it into the Hash field. Click "Verify". If the download is okay, it will give you a message saying so.
83482
Once both files have been extracted and the hash verified we can start flashing the SD card. Insert the SD card into your card reader/writer. Note the drive letter, as you will be needing this in just a moment. Mine is shown as D:\. Navigate to where your Win32 Disk Imager was extracted and double-click Win32DiskImager.exe. Depending on your PC settings you may not see the ".exe" at the end, but run it anyway. If it asks for administrative permissions, click "Yes". You will see this window appear:
83483
As you can see it has automatically selected my SD card (shown to the right of the Image File field. It is important to note this may not always be the case, so just be careful which disk you select. If you select the wrong one it may wipe any and all existing data on the disk. Just be careful which one you select.
When you are sure you have the correct disk selected, you may browse for your image (.img) file and double-click it.
83484
Now just click the "Write" button. When it asks you if you would like to continue, click "Yes". This process may take a little while.
83485
When it's finished, you're ready to boot up your Pi for the first time! I'm connecting mine to my HDMI monitor and my 2-in-one wireless USB keyboard/mouse. Insert the SD card into your Pi BEFORE applying power via the micro-USB connector. When you are sure everything is connected properly you may plug it in. I suggest using a standard USB-to-microUSB cable connected to a wall adapter. I don't recommend using power from a computer unless your computer is switched off and has a constant-on USB port. Otherwise your computer may try reading the Pi like it is a mass storage device, which may interfere with its operation.
***NOTE***
When you receive your Raspberry Pi from the distributor, it should come in a conductive bag (made of a silvery-plastic material). I suggest leaving your Pi either in or sitting on top of the bag whenever it is not in use. This will reduce the chance of a dangerous electro-static discharge which could damage or destroy the Raspberry Pi.
Now that the installation is complete and everything is set up, we're ready to boot it up for the first time! Once again, ensure the SD card, monitor, keyboard, and mouse are all plugged in to the Pi before applying power. When you are sure everything is set up correctly, you may plug in the power USB cable. The Pi should then begin booting.
83487
This may take anywhere from a few seconds to a few minutes. The first time will always take the longest, so don't be concerned if it seems to take a while. Once booted you will see an initial setup window. This only shows up once (after the first boot), and we are only going to change a couple of settings.
83488
First, navigate using the arrow keys on your keyboard to "Expand Filesystem" and hit "Enter". This should ensure your entire SD card can be used by your Raspberry Pi. The second setting I'm going to change is #3. I want my Pi to boot to the desktop right away, so once again navigate to that setting, hit "Enter", and select "Boot to desktop". You also have the option to boot into the terminal or straight into the Scratch environment. Scratch is a very high-level programming environment that uses puzzle pieces (blocks) modeled after C code statements to write basic programs. It is often used to design animations and simple video games. However, seeing as Scratch can be accessed from the desktop, as can the terminal, I suggest simply booting directly to desktop.
When you are satisfied with the changes, exit to the main menu (the original setup box), and tab down to "Finish". Hit "Enter". It will ask you if you would like to reboot. Select "Yes", and the Pi should reboot. This time, however, I wouldn't expect it to take as long, and instead of displaying the initial setup window it will instead boot straight to the desktop.
83495
***NOTE***
Keep in mind that simply unplugging the power is NOT the correct way to power down your Pi. Instead, use the power button that can be found at the bottom right of the screen.
That's just about it! You now have a running Raspberry Pi!
I hope this tutorial has helped you get started with the Raspberry Pi. Now that we have all this out of the way, and I have a running Pi to use for the remainder of the Personal Pi project.
As always, feel free to leave any comments or questions! Thanks for reading!
<-- Return to Part #1.5....................Proceed to Part #2 -->
cowboybob, January 16, 2014
Thanks, matt. I don't have a Pi, but am now thinking I should get one. You have provided an excellent, well written intro to the initial set up. I didn't know it had a built-in Basic. In that sense it reminds me of my first Apple 2+ (and what a grand time I had with it!!).
DerStrom8, January 16, 2014
I'm glad you liked it! The Pi has all sorts of useful features, so you won't regret buying one. Just make sure you have the right power adapter--it will need to supply 5 volts and be able to source between 700mA-1200mA for the Pi to work properly.
Reloadron, January 16, 2014
Many thanks Matt. I have been thinking about picking one up for amusement and who knows, I might learn something. My local Micro Center has them and I need a new monitor anyway so why not snag one. Ron
DerStrom8, January 16, 2014
Sounds like a plan Ron! Be sure to document your Pi projects, there's quite a demand for examples these days! I'm eager to see what you come up with.