Raspberry Pi — First Boot
Configuring & Get Acquainted of your Pi — RaspSeries — Episode #02
Congrats! In our First RaspSeries episode, we get pi one up and running without a monitor o/.
Now let’s see what it takes to get to know Raspberry Pi better.
Welcome!
This post we will be dealing with:
1- Configuring your PI2 - Basic Linux Commands to Explore Your Pi3 - How to Keep your System Software & Firmware Up-To-Date4 - Some usefull notes about your Raspberry Pi:)
Configuring your PI
Raspberry PI (Raspbian Buster Lite) has the following options available:
Raspberry Pi Software Configuration Tool (raspi-config)
1 Change User Password
2 Network Options
3 Boot Options
4 Localisation Options
5 Interfacing Options
6 Overclock
7 Advanced Options
8 Update
9 About raspi-config
I assume that you are logged in…
If not, open a new session on PuTTY, type:
login: pi
password: raspberry
Type clear to wipe the screen:
> clear
Now let’s type:
$ sudo raspi-config
Use arrows and tab keys to navigate through the menu.
The first menu you want to run is:
$ 8 Update - Update this tool to the latest version
This action will update the raspberry’s menu tool to the latest version.
Then:
$ 7 Advanced Options Menu
$ A1 Expand Filesystem
This ensures that all of the SD card storage is available. In my case, all 64GB is available now for the raspi operational system.
In the beginning, you should always choose this option so you will use your SD Card space thoroughly by doing so.
Now, navigate with tab and arrows again, choose:
$ 1 Change User Password
It’s a good idea to change the pi and raspberry credentials;
Then:
$ 3 Boot Options
$ B1 Desktop / CLI
$ B1 Console
Select B1, then hit Ok; this choose whether to boot from desktop or command line; CLI is a top choice o/;
Now:
$ 3 Boot Options
$ B2 Wait For Network At Boot-Time
$ No
This makes the choice to whether to wait for a network connection at boot time or not at all; Choose No;
Your Pi will boot up independently of your network connection.
Now localization issues:
$ 4 Localization Options
$ I1 Change Locale
Set up language and regional settings to match your geographical locale.
The default setting is for UK English with a standard UTF-8 character encoding (en_GB.UTF-8).
Select en_US.UTF-8 if you are in the USA.
Select pt_BR.UTF-8 if you’re in Brazil (my beloved country). choose UTF-8.
Now, timezone!
$ 4 Localization Options
$ I2 Change timezone
You’ll probably want to set this (I’m kidding!:)
Overclocking:
$ 6 Overclock
$ None 700MHz ARM, 250MHz core, 400MHz SDRAM, 0 overvolt
Leave the overclock option disabled at first. This is used for boosting the performance of your pi.
Overclocking refers to forcing a computer component, such as Central Processing Unit (CPU), to operate faster than its default clock frequency.
The Pi ARM1176JZF-S processor operates with the default frequencies:
- CPU: 700 million clock cycle / seconds (MHz)
- GPU: 250 MHz
- SDRAM: 400MHz
The downsize to the overclock situation is heat.
The ordinary operating voltage of the Pi is 5v and the typical current draw is between 700 and 1400 mA.
A fact that you should be considering when overclocking is that it will likely reduce the lifetime of your Pi.
Next: Keyboard!
$ 4 Localisation Options
$ 13 Change Keyboard Layout
The default keyboard settings are for a generic keyboard in a UK-style layout.
Other Settings:
2 Network Options— N2 — Wi-Fi (Enter SSID and Passphrase)5 Interfacing Options— P1 — Camera (Enable/Disable connections - official pi camera)
— P2 — SSH (The Secure Shell (ssh) server remotely access)
— P3 — VNC (Graphical remote access)
— P4 — SPI (Automatic loading for SPI kernel module)
— P5 — I2C (Automatic loading for I2C kernel module)
— P6 — Serial (shell & kernel messages on the serial connection)
— P7 – 1-wire (E/D 1 wire interface)
— P8 — Remote GPIO (E/D access to GPIO pins)7 Advanced Options — A1 — Expand Filesystem (see above)
— A2 — Overscan (Only if black bars are present on display)
— A3 — Memory Split (Change the amount of memory used by CPU & GPU)
— A4 — Audio (Force audio out to HDMI or Jack)About Raspi-Config (This is an alert message from developers for you)<Back> and <Finished> the config session o/
Basic Linux Commands to Explore Your Pi
- Just be careful not to erase anything by mistake!
Become the root user:
sudo su -
The minus sign denotes that you wish to gain a login to the environment, and because no other arguments are provided, it will attempt to log in as the superuser (root@raspberrypi). This is a security risk!
To exit and return to pi@raspberrypi:
exit
2. Get information on all the system’s processors:
cat /proc/cpuinfo
3. Let’s have a look at the address assigned to the Ethernet port (eth0) or wireless (wlan0) on the Pi itself using the following command:
ip addr show eth0 (for ethernet) or
ip addr show wlan0 (for wireless)
4. Starts Raspi-config, which lets you reconfigure your system (see above):
sudo raspi-config
5. This command tells you what directory you are in:
pwd (present working directory)
6. Reboots the Pi:
sudo reboot
7. Displays the amount of disk space available on your SD card:
df / -h
See we have of a total 58GB, 54GB free o/.
By typing df, you’ll see that the raspi system built 2 main partitions:
> /dev/mmcblk0p1 (FAT 256M) is equals to D:/ on windows; the first partition, mounted in /boot;
And:
> /dev/root (ExFAT 57.98GB) is equal to E:/ on windows; the entire disk mounted in /.
8. Displays memory usage information:
free -h
9. Displays the current time:
date
10. Log out of your current shell or SSH session:
exit
Prepares the Pi to be powered off. Always type this before pulling the plug!
sudo shutdown -h now
APT (Advanced Packaging Tool)
First, update your system’s package list by entering the following command:
sudo apt update
Next, upgrade all your installed packages to their latest versions with the following command:
sudo apt full-upgrade
Keeping your System Software Up-To-Date
Thanks to the distro RASPBIAN community that keeps hard work for you to have fun with your experience in RASPBERRY PI and to squish any discovered software bugs, you can keep your Raspbian up-to-date. Do it:
1. To fetch information about what packages have been updated:
sudo apt-get update
2. Proceed to install the updated packages (Answer yes when prompted):
sudo apt-get dist-upgrade
Keeping your System Firmware Up-To-Date
Why keeping our devices updated is important?
The first and probably the most important reason is security.
The second reason, which is related to the first, is that the software you are running on your device most certainly contains bugs.
Updating the kernel and firmware
The kernel and firmware are installed as a Debian package, and so will also get updates when using the procedure above. These packages are updated infrequently and after extensive testing.
The procedures that follow are optional. You should only use this for a good reason!
Get and Run this script called rpi-update written by Hexxeh:
To install the tool run this:
sudo apt-get install rpi-update
2. Now, whenever you want to check for firmware updates, type (and reboot once the script says it has updated your system successfully):
sudo rpi-update
Firmware lives on a special chip; in the raspberry pi this will live on the first partition of the SD Card.
Wi-Fi Network Setup (Desktop mode only)
The easiest way to set up the Wi-Fi adapter is to use the included WiFi Config:
1. Type this (and press the Enter key to start the graphical desktop environment):
startx
Note: This does not work in CLI mode :/
2. Double-click on the WiFi Config icon located on the desktop;
3. From the Network drop-down menu, select Add;
4. Fill out the information for your access point and click on the Add button;
5. Your Wi-Fi adapter will associate immediately with the access point and should receive an IP address as listed under the Current Status tab;
6. From the File drop-down menu, select Save Configuration;
7. Exit the application and log out of the desktop environment:
exit
And that is all folks for now! o/
Next Steps
In the next episode of #raspiSeries you’ll learn how to connect via a network to your pi from another windows computer using Secure Shell (SSH) and a public-private key pair.
Do not miss this great event.
Bye!!!
Notes:
1. You can actually create several systems, each with a different operating system, so at the end, you’ll have a pretty versatile system that you can turn into a completely different machine by simply replacing the card;
2. For some limitations around installing the operating system, you cannot copy an ISO image of a DVD to an SDCard. Instead, we need a snapshot of a system that has already been installed out that we can boot from. You use a separate computer to install the Pi’s operating system on an SDCard that you use to boot Pi;
3. Before you write the SD Card image to an SD Card you can optionally check whether the image is valid; in Windows use fciv file.zip — sha 1 command (link to Microsoft page);
4. In the configuration program called Raspi-config use the cursor-down key to move to the next item, and the cursor-up key to move to the preceding one. To select a new item, press one Tab key or the cursor-right key; press the spacebar or the return key to select the new item; Raspi-config will not start automatically the next time you boot the Pi. Don’t worry, invoke this command:
sudo reboot
5. Raspbian contacts a time server on the internet when it boots and sets the current time and date automatically, but it doesn’t know your time-zone unless you set it for yourself (instructions above);
6. Debian comes with a package manager and its name is apt-get (apt stands for Advanced Packaging Tool); it automates the whole process of downloading and installing new software and also helps you get rid of stuff you no longer need.
Related Posts
01 Episode #RaspSeries — Raspberry Pi — How to Set Up a Headless Raspberry Pi — Without Ever Attaching a Monitor!
02Episode #RaspSeries — Raspberry Pi — First Boot — Configuring & Get Acquainted of your Pi
03Episode #RaspSeries — Raspberry Pi — Passwordless SSH Access on Win10 — Using Open SSH Keys to Get to Your Pi Quickly!
04Episode #RaspSeries — Raspberry Pi Meets AlaMode® — An Arduino compatible board for the Raspberry-Pi
05Episode #RaspSeries — Mosquitto Meets Raspberry Pi — Part 1 — IoT Project Initialization — Join Our Knowledge About Mosquito & Raspberry PI
Credits & references
Updating and upgrading Raspbian by www.raspberrypi.org
RASPI-CONFIG by www.raspberrypi.org
Book: Hacking Raspberry Pi® by Timothy L. Warner
RPi SD cards by elinux.org (check the Raspberry Pi SD cards compatibility list)
We’ve evolved in a world where if you have a laptop you can be an educator