Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / operating-systems / Windows

Raspberry Pi 2: Installing the Operting System

2.09/5 (4 votes)
8 Apr 2018CPOL4 min read 13.2K  
Installing the Raspberry Pi.

The Raspberry Pi become quite famous and sold 1.75M units, so that most of the top open source software manufacturers are trying to give support to it. The 7 different types of operating systems that can be installed in Raspberry Pi is listed in this link.

Out of this list, the Raspian is the most recommended choice for the new users. Its extremely easy to install and use. The Raspian is Debian based Linux operating system for ARM 32 bit processors. Debian (and Ubuntu, Mint, etc.) is the most commonly used Linux OS for laptops and PCs. So lots of supported software are already available for Raspbian also.

The simplest of all is Coder OS from Google. This is also based on Raspbian and it has additional applications (web server and web based development applications) pre-installed.

It’s a free piece of software that turns a Raspberry Pi into a simple, tiny, personal web server and web-based development environment–just what you need for crafting HTML, CSS, and Javascript while you’re learning to code. It just takes ten minutes to set up and you’re ready to start experimenting with building real web stuff.

Coder

Installation

  1. The installation of the OS is straight forward. Download the OS from the Coder site and write the image to SD Card.
  2. Just unzip the downloaded file. You will end up with a folder called coder_<versionno>. Inside that folder, there’s another folder called coder_<versionno> and under that, is an SD card image file called raspi.img.
  3. Windows Users: To write the image to SD Card download the Win32DiskImager utility (it is a portable zip file). You may need to run the utility as Administrator! Right-click on the file, and select ‘Run as Administrator’ 300px-Win32DiskImagerSelect the image file you extracted above. Select the drive letter of the SD card in the device box and click Write. Be careful to select the correct drive; if you get the wrong one you can destroy your data on the computer’s hard disk!
    The complete instructions for other OS users can be found in following link
  4. If you are on windows download and install Bonjour Print Services (It’s just 5MB)

Connecting Raspberry Pi with the computer

1. Connecting through Hub

Connecting Raspberry Pi via hub doesn’t need any configuration at all. Just connect the Raspberry Pi to Hub. The necessary IP settings will be automatically configured via hub’s or switch’s DHCP server.

2. Direct connection to computer via LAN cable

To connect Raspberry Pi via LAN cable, the easiest choice is to configure both the PC and Raspberry Pi to use static IP addresses. The catch is Windows users can’t directly edit the contents of Raspbian/Coder files as Coder OS uses ext4 file system. This file system is not supported in Windows.

You may need to use Linux OS to edit the contents. The easiest option for Windows users is to use Virtual Box to run a Linux OS in virtual machine. To configure the IP address mount the SD card and use: sudo nano <mountpoint>/etc/network/interfaces and change the file so that it contains:

auto lo

iface lo inet loopback

iface eth0 inet static
address 10.42.0.200
netmask 255.255.255.0
broadcast 10.42.0.255
gateway 10.42.0.2

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

To configure DNS servers use : sudo nano <mountpoint>/etc/resolv.conf and change the file so that it contains:

nameserver 8.8.8.8
nameserver 8.8.4.4

Finally issue the sync command and unmount / safely remove the SD card

The DNS/nameservers mentioned above are Google’s public DNS servers. These can be configured to other open/internal DNS servers as you prefer. Here the PC will act as a gateway for Raspberry Pi. So the PC’s Network adapter should be configured with static address 10.42.0.2 as well.

Static IP

 

Completing the installation

Once the Coder OS is installed and configured in SD card, insert it into the SD card slot on Raspberry Pi and switch on the power. After 2 minutes, browse the http://coder.local/ address in your PC browser. This should show the SSL error, ignore the warning and proceed. 1.-login-google-coder-raspberry-pi

If you are able to see the screen similar to above, you’ve configured your Raspberry Pi successfully! Congratulations !!

You may check this link to understand how to configure and work with Coder web based development environment.

Troubleshooting

If your browser unable to open the page, you may need to check Raspberry Pi is up or not and connected to the network or not. Windows user can use Advanced IP scanner software to detect the computers connected in same network. You may download it from http://www.radmin.com/products/ipscanner/

If you are able to see the Coder in Results box, it means that your Raspberry is up and connected to your network. It its not detected, check your network configurations and connections.

IP Scanner

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)