As promised earlier, we’re back with another article about the delicious dish called Raspberry Pi! If you missed the first bite, you can grab it here. Also, if you have no clue what the Raspberry Pi is, here is the introduction. In this post we are going to boot your Raspberry Pi for the first time and see the magic it can do. So, let’s get started.
Obtaining appropriate operating system
Raspberry Pi supports ARM version of Linux officially. There are surprisingly high number of options available out there! Each of the distributions are targeted to some specific purpose. As we are just getting started, we will be using the recommended distribution – Raspbian Wheezy. You will first need to download it from here. (To achieve higher download speed, use this torrent.) If you are a seasoned Linux user, you can also try the other options available on the official download page. For the scope of this article we will be focusing on Raspbian Wheezy only.
Preparing the SD card
Unlike our regular computers, Raspberry Pi does not have any on board storage. It rather uses SD card for storage. You will need a SD card – 4GB class 4 card should work fine. We need to copy the file downloaded in previous step to our SD card. However, simply copying the filed won’t work. Here are the steps to prepare the SD card:
- First, extract the ZIP file downloaded in last step. You should get an image file – a file ending in .img extension.
- Insert the card in your computer and format it. (Quick format should be okay.)
- Now, download the Win32DiskImager utility from here. Downloads are on the right column. We want the one called ‘binary’. This utility is going to copy content from the .img file to the SD card.
- Extract the ZIP file you just downloaded and run the file Win32DiskImager.exe from the extracted folder.
- The utility will give you option to select your image file and memory card to write to. Choose .img file you extracted in first step. Also choose your SD card under ‘device’. Be careful here! If you choose wrong drive, you may lose your data.
- Make sure that you have made correct choices and hit the button which says ‘Write’. Now, the utility will start copying data to SD card.
- After the utility has finished copying, click exit and eject the SD card.
Your card is now ready!
On Linux and Mac OS
You need to use the dd tool to write image to SD card. here are the details to use the tool.
Preparing the Pi
So, you have got an SD card, ready to power up the Raspberry Pi. Now, it’s time to do some preparations before we get to eat the dish. Raspberry Pi requires 5 volts of DC power. Any good micro USB phone charger would work here. As USB ports of computer do not provide sufficient power, connecting the Pi to computer for power is not recommended. Connect the power adapter to the board but don’t switch it on yet. Next, connect the board to a display. You have two options here: HDMI and composite. If your monitor supports HDMI input, you can connect using regular HDMI cable. Audio will automatically be done over HDMI. If you choose to go composite cable route, connect one end of composite cable (this cable is one which came with your old DVD player.) to yellow port on the board and another end to the TV. You can connect speakers to the audio out on board. If you want to connect your Pi to the internet, connect Ethernet cable too. Now insert the SD card prepared in the last step. Make sure everything is connected correctly once again and you’re ready to go.
Starting it up
Hold your breath and switch on the power. (There is no separate power button on the board.) Assuming everything went okay, a green LED (the one which says ‘OK’ beside it) should light up. Next, red LED adjacent to green one should light up. This means that your power is working fine. Next three LEDs would behave according to the state of your Ethernet connection.
By this time, you should be able to see some text running on your screen. Congratulations, you have successfully booted up your Raspberry Pi. Soon, you would be presented with a configuration menu. Go carefully through each option and complete the setup. Defaults work well in most of the cases. There are a couple of places where you should pay special attention to. First one is SSH. You want this to be enabled. This would allow you to have remote access to your Raspberry Pi. Another one is about storage card. If you used SD card larger than 4 GB, here you can expand partitions to make use of that extra space. Complete the setup and exit from menu. A reboot will happen if required.
Assuming everything went right during the setup, the Pi will boot right away and you will be presented with the login prompt. Enter the login name and password. For wheezy, default username is ‘pi’ and password is ‘raspberry’ (of course, without quotes).
A disclaimer will be displayed first and then you will see cursor blinking next to line which says
pi@raspberrypi ~ $
Whoa, you have full Linux console waiting to obey your commands. You have prepared the dish! Eat it right away. Go ahead and have fun.
“But hey, didn’t you tell me that this thing runs like desktop computer? Where do I see files? Where is my wallpaper? I want my kitties on computer – everybody loves kitties, right!” – I hear you scream! Relax, everything is just a command away. Just type command and press enter.
This command starts x-server (something which lets you have menus and kitty wallpapers!) in Linux. You should be able to see the desktop now. Go ahead, play around. Make yourself familiar with the system. We will explore more about the software, play a few videos and try to remotely control the Pi in coming posts.
Have got something to share or want to ask something? Let us know via comments.