Let's make comprehension easy ...
Looking for installing Raspberry Pi without a keyboard and monitor? If yes, the below blog can help. Let us to run through the steps required for installing OS on Raspberry Pi and then prepare for remote access. Before we begin, I assume we have the following ready: Raspberry Pi board, a laptop or computer with Linux or Windows, a LAN wire and a router.
First, let us download the Raspbian Operating System image from https://www.raspberrypi.org/downloads/. There are various OS that can be installed on Raspberry Pi. I downloaded the wheezy zip image to my linux machine.
Then inorder to install the downloaded image, unzip the image with the below command:
Put the micro SD card into the card reader of your laptop or system, and ensure you can see it. It will be usually /dev/mmcblk0 when we execute the below command:
Ensure the micro card has no partitions on it. If present then format the card using the below command
Finally unmount the partition and copy the unzipped image to Raspberry Pi using dd command as below:
This takes a few minutes, once done, take the micro card out of system and plug it into the raspberry pi.
Next step will be to connect the LAN wire to the router, plug in the micro card to Raspi and power on the raspi. At this point the Raspi boots up, but you need to know the IP address of your Raspi which can be obtained by looking at your Router interface or using NMAP tool from your linux
sudo apt-get install nmap
Once you know the IP address, ssh into it with the following credentials:
Username: pi
Password: raspberry
Then run "sudo raspi-config" to configure timezone, expand filesystem and change the password.
Connect the Wifi dongle to Raspberry Pi and then login to Raspberry pi.
Update the file: '/etc/wpa_supplicant/wpa_supplicant.conf' with the below contents.
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="<network_name>"
psk="<password>"
}
Ensure the below lines are present in file: '/etc/network/interfaces':
auto wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
Reboot the machine:
Edit the file '/etc/network/interfaces' and replace the line:
iface wlan0 inet manual
with
auto wlan0
allow-hotplug wlan0
iface wlan0 inet static
address 192.168.2.100
netmask 255.255.255.0
gateway 192.168.2.1
dns-nameservers 192.168.2.1
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp
Restart the networking services with the below command:
We will now be able to ssh into raspberry pi at 192.168.2.100, if SSH service is enabled during raspi-config
Comments: