InstallRaspberryPi - albertmon/smarthome GitHub Wiki

Quick install of Raspberry Pi

This page contains basic instructions for the headless installation and initial configuration of Raspberry Pi OS.


Headless means that you don't need a screen, keyboard or mouse. You only need a PC with a ssh client (PuTTY or another)
This page is a compilation of documentation on Raspberry Pi .org and some searches for fixes on the internet.
I have tried to keep it as simple as possible.
You need access to a PC/Laptop (I used a windows PC) and (opionally) a router
You need a working WiFi network
You need a card reader on your PC/Laptop

Install Raspberry Pi OS using Raspberry Pi Imager

  • Choose Raspberry OS (With or without Desktop)
    If you choose without, you cannot use VNC!
  • Put your memory card in your PC
  • Choose Storage and
  • Press WRITE and confirm that you want to continue
  • After the writing and verifying, you can remove the memorycard and press Continue Now insert the memorycard into your PC again

According to Windows your memory card has 2 partititions, but Windows will recognize only one and asks you to allow formatting
DO NOT FORMAT!! Your Raspberry Pi will be cleverer and will recognize all partitions!

  • We want (and can) add files to the boot partition.
    This partition is recognized by Windows and labeled boot
    To enable ssh access:
    Open your File Explorer,
    create an empty file in the root directory of the boot partition of the memory card and name it ssh
    To enable WiFi:
    Open a text editor (e.g. Notepad++)
    Create a file in the root directory of the boot partition of the memory card and
    name it wpa_supplicant with the following content

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
country=NL

network={
ssid="Your-SSID"
psk="Your-Password"
}

Of course you must replace the strings Your-SSID and Your-Password by your own values!
Save the file and check the extension! The extension must be .conf
Now start putty (or other ssh client) and connect to yor Pi...

Fix the IP-number

We have a problem here. How do we find the IP number?
To find it, we need to have a look into the router.
Because every router has its own user interface, we cannot provide you with one simple answer.
If you followed the instructions above, the name of your pi is raspberrypi.
Search for the corresponding IP and MAC-address in your router.
Configure your router to set the IP for that MAC-address to a fixed preset number.
Make sure that the number you use is NOT WITHIN the range for automatically assigned DHCP numbers. Make sure that your router settings are saved and reboot the router and the Pi.
Now it should get the pre-set IP-number from your router

Raspi Config

To set some important settings we use raspi-config: In your teminal session enter: sudo raspi-config You can go up and down in the menu using arrow-up, arrow-down, arrow-left and arrow-right (or tab) You select by pressing enter We will change some settings: We already configured the Wireless Lan, so arrow-down

Change Password

You MUST change the password (BE SURE TO REMEMBER!!!! There is no way back)
In the main menu go to System Options and enter:
In the System Options go to Password and enter:
Now you can change the password (BE SURE TO REMEMBER!!!! There is no way back)

Change the hostname

In the main menu go to System Options and enter: In the System Options go to Hostname and enter: You can change the hostname to anything e.g. smarthomepi, domopi etc. Use your imagination,
but you can use only letters, digits or -)

Enable VNC

In the main menu go to Interface Options and enter: go to VNC and enter: go to Yes and enter

Localisation

In the main menu go to Localisation Options and enter: Select Locale and type a space when you want the locale installed (e.g. en_GB.UTF-8, nl_NL...) Select Timezone and select the city with wich you share the timezone Select Keyboard and the keyboard will match your default locale We already set the WLAN Country

Reboot when you get the option to Reboot


Up: Wiki Home Next: Install Docker