Lib4U

‎"Behind every stack of books there is a flood of knowledge."

Raspberry Pi: Installing an OS (Quick start guide)

RaspiModelB-1024x902

In terms of a quick hardware wrap-up:

  • Uses a Broadcom BCM2835 Chipset
  • 32bit 700 Mhz ARM11 processor
  • 512 MB RAM (Model B)

I have a little experience working with the Arduino development board, and since the Raspberry PI was lying around the house I thought to get started primarily with the intention of: getting my hands dirty with both a little bit of Hardware work as well as learning a little of non-Windows based OSes.

I initially wanted to write this tutorial, because I didn’t really find something simplistic enough to follow and get started with the Raspberry Pi. As I learn more using the board, I intend on writing similar tutorials that are easy to understand and replicate.

For this tutorial, we’ll do the following:

  • Install an OS (Raspbian: a Debian variant for the Pi)
  • Some initial configuration/setup
  • Setup WiFi
  • See the Raspberry Pi in action!

Before we go further, there are two crucial things required to proceed:

  1. Raspberry Pi unit
  2. At minimum a 2 GB SD-Card (the extracted OS is ~ 1.8 GB)
  3. USB Hub
  4. Keyboard/Mouse

This is how the unit looks with the SD card in place:

Figure 1: Raspberry Pi with SD Card inserted

Figure 2: Front view of the Raspberry Pi

The next image from the Raspberry Pi foundation pin-points to the location of each component:

Figure 3: Architectural functional view of the Raspberry Pi

Great, now that we have some background information associated with the Raspberry Pi, lets move onto isolating which Operating System to use. The downloads section on the official website lists 4 OSes (and their description also mentioned from there):

  1. Raspbian “wheezy”: If you’re just starting out, this is the image we recommend you use. It’s a reference root filesystem from Alex and Dom, based on the Raspbian optimised version of Debian, and containing LXDE, Midori, development tools and example source code for multimedia functions. 
  2. Soft-float Debian “wheezy”: This image is identical to the Raspbian “wheezy” image, but uses the slower soft-float ABI. It is only intended for use with software such as the Oracle JVM which does not yet support the hard-float ABI used by Raspbian. 
  3. Arch Linux ARM: Arch Linux ARM is based on Arch Linux, which aims for simplicity and full control to the end user. Note that this distribution may not be suitable for beginners. The latest version of this image uses the hard-float ABI, and boots to a command prompt in around ten seconds. 
  4. QtonPi: QtonPi is an Embedded Linux platform plus SDK optimized for developing and running Qt 5 Apps on Raspberry Pi. More information is available here.

The first two are Debian variants optimized to for the Raspberry Pi hardware. The Raspbian “wheezy” is the recommended one for beginners. Having never/very little knowledge of Linux/Debian this was unanimously my choice and what I will focus on installing. The downloads page offers a few mediums of getting an image (via Torrent, direct download etc.) grab your image from one of the mirrors, save it to disk and extract to a location. The file is typically around 1.8 GB after extraction.

PS: Since, I’m using Windows this guide will focus on installing the OS via Windows

We’ll use a utility called Win32 Disk Imager to transfer the Raspbian OS onto the SD card. Insert your SD-Card into your PC and make note of the drive letter (in my case it was H:). Now, we’ll open up Win32 Disk Imager and browse to where our OS image resides and click Write. This will begin the process of writing the OS to your SD card:

Figure 4: Win32 Disk Imager writing to SD card

After it completes writing, you will get a pop-up that quite simply says Write Successful. Next, we’ll place the SD card into the Raspberry Pi and make the following connections:

  1. Connect the Raspberry Pi to a monitor/TV via the HDMI output
  2. Supply 5V power either using the power input pin or via the micro USB port
  3. To one of the USB ports connect a USB hub. Into that hub I connected a wireless mouse andkeyboard

Figure 5: Connections into the Raspberry Pi

The red LED turning on was the first great sign that everything is working well. If you’ve got a display connected you should next be able to see the following Raspberry Pi configuration screen the first time you boot:

Note: Sorry for the poor quality pictures from this point-on. I didn’t really know how to get a screen capture!

Figure 6: Initial Raspberry-Pi Configuration

In this screen, one of the only configuration I would suggest performing is to enable expand_rootfs. What this does is it expands the OS root file system to fill the entire SD card, and since I was using a 32GB SD card it made sense to use it as a hard-disk. Use your keyboard to scroll to the option and hit enter:

Figure 7: Expand root file system to fill the entire SD card

The only other thing I would recommend changing is the password so you don’t remember the default:

The default login details are:

  • Username: pi
  • Password: raspberry

As soon as you select the change_pass option, you will get a prompt for user input at the lower-left hand side of your screen. Enter your new password:

Figure 8: Enter new password

For now, those are the only two things I’d recommend changing for the moment, if later you ever feel you needed to go back to the configuration page, you can do so by typing this in your terminal:

sudo raspi-config

So, let’s hit Finish on the Raspi-Configuration window:

Figure 9: Finish with configuration settings

This will prompt you to reboot next, and you should select yes. After you select yes for a reboot, you should see some command prompt type activity on the lower left hand side of your screen:

Figure 10: Rebooting Log

After the board reboots, you will see a lot of initial set-up activity occurring, including the resizing of the root partition to fill up the entire SD card (if you did select that option). This took me quite a few minutes, so don’t be surprised if you have to wait here for a bit. If your display goes away, just press a key from your keyboard and you should see the progress on the screen again:

Figure 11: Resizing OS to fit the entire SD card

After the resizing has been done, you will finally be prompted to login. Your details from when you changed your password:

Figure 12: First Login

Perfect. We just had our first successful login on the Raspberry-Pi!

Figure 13: Login Success

Now we are within the terminal based view of the Raspbian OS! If you are a more experienced Debian/Linux user I would advise you to stop reading at this point :) . However, since I am not … I was frantically searching for a Windows-like-GUI view for the OS.

Fortunately, Raspbian does have a GUI based view and it is called the X Window System! If you are a little curious and want to read more about how the X system is able to accomplish the visual interface, I would suggest reading this article.

All you need to do to enable the X Window System is to type in the console window:

startx

Figure 14: Start X Window System

Personally, what happens next was the most exciting moment for me in terms of setting up the Raspberry Pi. To believe that something that costs merely 35 dollars, with such minimal initial setup – can bring up a relatively full fledged OS was truly amazing:

Figure 15: Start X Window System (GUI for OS)

Similar to the Start button in Windows, you can click on the lower left button to get a list of applications arranged by Accessories/Internet/Programming/System Tools etc:

Figure 16: Start button like Windows

At this point, we pretty much have the Raspberry Pi setup in OS mode and you can play around and experiment with the board/OS so far.

The internet opens tons of possibilities, so I decided to end this article by outline out how to enable WiFi on the board as well (there is an on-board LAN port if you prefer a wired connection – see Figure3). However, since I find WiFi is more realistic to get access anywhere thus I chose to use a USB WiFi adapter. I am using one by Rosewell (RNX-G1), it cost about $20. It was really as simple as – plugging the adapter into my USB hub and getting internet access!

Figure 17: USB WiFi Adapter for Raspberry Pi

That takes care about the hardware required, in terms of making the OS connect to a WiFi network here is how to do it:

Locate the WiFi Config icon on your desktop and double click it:

Figure 18: WiFi Config in Raspbian

This opens up a GUI that basically allows us to view/connect to/scan for networks:

Figure 19: WiFi Network Scanning

Click on the Scan button and you will get a list of networks it was able to pick-up in range:

Figure 20: WiFi Networks In Range

To add the network, you have to double click on it from the list, which opens up another window. In here, you can enter a password in the PSK field (if the WiFi network was password protected) and merely click Add.

Figure 21: Adding a WiFi

Now in the WPA_GUI window, from the Network: drop-down list select the WiFi network you want to connect to and click the Connect button:

Figure 22: Connecting to a WiFi connection

You should now see a successful connection established:

Figure 23: WiFi connection established

Finally, lets open up a browser and access Google. Raspbian comes installed with a few browsers by default, I chose NetSurf. You can access it by going to the Start Button (lower left corner) -> Internet -> NetSurf:

Figure 24: Google Home-page

Unfortunately, there is no Flash support currently in this version of Raspbian so no Youtube videos for the time being :( . I did find the NetSurf browser to be quite cumbersome to use and I immediately switched to using Firefox instead. The only thing to note is Firefox is called iceweasel in Debian. To download this all you have to do is open up your LXTerminal which is the terminal/console way of communicating with the OS:

Figure 25: LXTerminal

And type the following:

sudo apt-get install iceweasel

This should download and install Firefox for you. Lastly, I wanted to end with how to turn off the board correctly. Being a Windows user, I couldn’t help but look for a shut-down button, but here is what you need to do, type the following on your terminal window:

sudo su
poweroff

The first line is the Windows equivalent of going into Administrator mode (in Linux referred to as super user). And the next line quite simply does what it says power-off! You will see the GUI based OS go away first, after which there will be some terminal activity and finally you will see the signal to your monitor go off. This is when you can begin to plug everything out.

Source:

http://www.wisegai.com/2012/11/01/raspberry-pi-installing-an-os-quick-start-guide/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Virtual Fashion Technology

Virtual Fashion Education

toitocuaanhem

"chúng tôi chỉ là tôi tớ của anh em, vì Đức Kitô" (2Cr 4,5b)

VentureBeat

News About Tech, Money and Innovation

digitalerr0r

Modern art using the GPU

Theme Showcase

Find the perfect theme for your blog.

lsuvietnam

Learn to Learn

Gocomay's Blog

Con tằm đến thác vẫn còn vương tơ

Toán cho Vật lý

Khoa Vật lý, Đại học Sư phạm Tp.HCM - ĐT :(08)-38352020 - 109

Maths 4 Physics & more...

Blog Toán Cao Cấp (M4Ps)

Bucket List Publications

Indulge- Travel, Adventure, & New Experiences

Lib4U

‎"Behind every stack of books there is a flood of knowledge."

The WordPress.com Blog

The latest news on WordPress.com and the WordPress community.

%d bloggers like this: