Booting the Raspberry Pi for the first time
Once you have received your Raspberry Pi and unpacked the mini-computer it is time to fire it up and see what its all about. However much like a normal desktop computer wont boot without a operating system (such as Windows) neither will the raspberry. This guide will show you how to pick a operating system, flash it to a SD card and boot your Raspberry Pi for the first time.
To complete this project you're gonna need:
Selecting a Operating System (OS)
Since the Raspberry Pi is powered by a so-called ARM processor it cannot run the same operating system as your computer. Instead it must run one of the operating systems that have been optimized and ported to the Raspbery Pi ARM hardware architecture. There are a few different operating systems available as listed here. It is important to note that most of them are based on the linux kernel and that it is not possible to run windows on the Raspberry Pi.
Raspbian “Jesse”
The Raspbian “Wheezy” operating system is the standard operating system to run on the Raspberry Pi. It has very good integration with the hardware and comes pre-loaded with a graphical user interface and development tools. This will come in very handy if you are not too experienced in a linux enviornment.
Please note that the use of the dd tool can overwrite any partition of your machine. If you specify the wrong device in the instructions below you could delete your primary Linux partition. Please be careful.
dd bs=4M if=2016-02-09-raspbian-jessie.img of=/dev/sdd I used: sudo dd bs=4M if=2016-02-09-raspbian-jessie.img of=/dev/sdg Run sync
dd bs=4M if=/dev/sdd of=from-sd-card.img truncate --reference 2016-02-09-raspbian-jessie.img from-sd-card.img diff -s from-sd-card.img 2016-02-09-raspbian-jessie.img
Once the OS has been flashed onto the SD card, some files need to be added in order to enable SSH access and have the Pi connect to the desired network via WiFi.
Etcher automatically ejects the drive when the flashing procedure is completed, so you may have to remove and reinsert the microSD card in your computer.
To enable SSH access,
<code oobas>create an empty file called "ssh" //(no file extension!) and put it on the microSD card's /boot directory. </code>
to enable WiFi,
create a file called "//wpa_supplicant.conf"// with following content, on the microSD card's /boot directory: ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1 network={ssid="<your_ssid>" psk="<your_password>"}
Replace “<your_ssid>” and “<your_password>” with the values matching your own wireless network and save the file. Upon first boot, the file will be moved to the correct location on the filesystem.
Once we have programmed the SD Card - plug it into the Raspberry Pi, your should now have a configuration looking like this:
Connect power and you should see the boot sequence on your TV (if not check if you selected correct HDMI input on TV). After first boot the Raspberry Pi boots up in setup mode. If it does not boot into setup mode you can type the following command to get there:
sudo raspi-config
When in setup mode we want to:
For more details on how this is done in the setup menu watch this video:
rpi-update is a tool to upgrade the firmware for your Raspberry Pi. Firmware is a small package of code that usually lives on a special chip of a computer that helps the software know how to talk to the hardware.
sudo rpi-update
We can now reboot the Raspberry Pi - and when it boots again it will come up with our new configuration! To log in use the following credentials:
User: pi Password: raspberry
Your Raspberry is now setup, configured and ready for you to use for any purpose you want.