This article might be helpful for those who wants to set static ip for raspberry pi system using ubuntu os. Or without using raspberry pi itself. The below mentioned ip setting are valid if ubuntu is configured to share its network via eth0 interface, thus making ubuntu a dhcp server and pi a client.
To do this, all that is needed is a Ubuntu pc and MicroSD with raspbian OS installed.
In 3 steps it can be done.
Step1: FIND THE NETWORK INTERFACE FILE
Insert the MicroSD onto the Ubuntu installed Pc and 2 partitions will be opened. One of which is a FAT partition openable to windows system(~53MB) and the second is a EXT4 or similiar partition that is hidden to windows and visibe only on linux(~ rest size of the memory card). The image below shows both partitions opened once the raspbian installed microsd is inserted.
Step2: EDIT THE NETWORK INTERFACE FILE
Open folder /etc/network/interfaces of the microSD.( be careful as the ubuntu pc also has same file in same location but different media). So carefully open the file. This file belongs to the owner “pi” of raspberry and cant be simply edited from the user of the ubuntu pi. So to edit this file press atl+f2 from ubuntu and enter gksu gedit.
Now you will be prompted to enter the passoword of the ubuntu admin account. Soon the text editor application is opened with super user permissions. Now open the earlier located file /etc/network/interfaces (of the MicroSD only) and edit the content.
You will see the line
iface eth0 inet dhcp , add a # before it
(#iface eth0 inet dhcp) and add the line
iface eth0 inet static . And below this line enter the following.
address 10.42.0.10 # the address you want your pi to have
network 10.42.0.0 # the address of the ubuntu system from connection manager->connection information
then Save the file.
In case you are not sure of any details leave a ‘#’ symbol before it to skip the execution of that line.
Step3: BOOT THE PI WITH THE EDITED INTERFACE FILE
Insert the MicroSD into the pi, and connect the pi back to the Ubuntu pc via lan cable. Once the ubuntu pc is set to share its network to other computers via lan cable, the pi gets a static ip address and network access via the ubuntu pc. This static ip address can be used to access the pi via ssh or rdp.
Once this is done you are good to go. To connect headlessly to the pi using ubuntu pc go to http://goo.gl/6mh2cr.