I’ve just bought a Raspberry Pi and not having access to an extra monitor, keyboard or mouse I had to make do with just a router and an ethernet cable. I realize you could already piece most of this together from other places on the internet, but I wanted to document the way I did it. Having called a vote the motion passed with one in favor and none against so online it goes.
sha1sum 20XX-XX-XX-wheezy-raspbian.zipand make sure it matches the one on the download page.
unzip 20XX-XX-XX-wheezy-raspbian.zipto extract the image.
df -hto find its name. In my case it was
sudo dd bs=4M if=20XX-XX-XX-wheezy-raspbian.img of=/dev/XXX. This step might take a few minutes without any feedback so be patient.
sudo syncto ensure that everything in memory was written to the card, remove it, and plug it into your Raspberry Pi.
ssh 192.168.0.XX -l piwith the right IP address from the previous step. When prompted for the password, type in “raspberry”.
sudo raspi-configand select the
updateoption. Mess around with other configurations as you please. Be careful with the overclocking and push “finish” when you’re done
ssh 192.168.0.XX -l piagain.
sudo apt-get update && sudo apt-get upgrade.
You now have a working installation running. If you wish to have a wireless internet connection there’s a couple more things you might want to do.
sudo nano /etc/network/interfacesin and paste this into the file (Ctrl+Shift+V should work):
wpa_passphrase yourssid yourpassword. Type
sudo nano /etc/wpa_supplicant/wpa_supplicant.confin and paste something like this into the file.
sudo apt-get install wicd-cursesand run it. It’s not as messy as configuration files and if you don’t know the quirks of each security setting it’s a lot easier. I’ve run into some problems with WEP on wicd-curses and that’s why I’ve opted to document the configuration files though.
sudo /etc/init.d/networking restartyou can unplug the ethernet cable and your Raspberry Pi should automatically connect to your router.
Now you could go into your router page and find which IP was assigned to the Raspberry Pi each time you want to connect or you could force it to choose a static IP. I chose a different option which was to use Avahi. Avahi makes the Raspberry Pi advertise itself to the network as “raspberrypi.local” so you can always use this alias to ssh into it, whatever IP it is assigned by the router. Pretty neat.
sudo apt-get install avahi-daemonand then
sudo insserv avahi-daemonon the Pi.
sudo nano /etc/avahi/services/multiple.serviceand paste in this.
sudo /etc/init.d/avahi-daemon restartand disconnect your ssh session.
ssh [email protected]or alternatively change the hostname to something more unique.
sudo nano /etc/hostnameand insert whatever name you wish. Then on to
sudo nano /etc/hostsand replace “raspberrypi” with the name you chose earlier and finally run
sudo /etc/init.d/hostname.sh startto enable the changes.
That’s all for now folks!