Restarting my Raspberry Pi

mer. 05 octobre 2022

This is the second version of this article after a long break ( Life is not a long quiet river ).

Ok, first I to give life back to my old Raspberry Pi 3B+.

I will use an image for Ubuntu Server 64-bit. Why? For a lot of reasons:

  • Debian packaging and distribution is very robust.
  • More packages are often available on Ubuntu.
  • I'm used with Ubuntu-like distribution.

I think one could get mostly the same result with other main stream distributions.

All installation details can be found here. But it does not start well, I do not have rpi-imageron my old Linux Mint. I get it from Raspberry Pi website.

Then I can install

$ rpi-imager

And configure according to the downloaded image. Before writing to the SD-Card, click on the gear, specially to configure default login (named thereafter LOGIN), password and activation of ssh server (I do not want to use a screen with my RPi, only a pure server). It will take about 10 minutes.

First boot:

  1. I connect my RPi to one of my switch on my Free LAN,
  2. I power it up.
  3. LEDs blinks and the RPi boots.
  4. From my browser, I move to my network monitoring page provided by Free's router and find a new device named ubuntu and retrieve its IP address, ADDR thereafter.
  5. I ping it: seems to be alive.
  6. I try my first connection and all works well.
  7. I use Free's monitor page to assign the right name, ehome, and a fix the IP ADDR to my server, 192.168.1.3 for example. Select this address depening your home router configuration. In the following, I will call it ADDR.

IP address 192.168.1.2 is already used by my pretty old Banana Pi server used as a printer and file server. Why not using it? Its OS is very old and I'm not sure that Banana Pi is still actively developed.

Hint: as we will use several fixed information like LOGIN, ADDR, etc. a good practice to gather this information in a note file (a) to not forget them and (b) to quicly retrieve them.

Next step, put a public key in .ssh to avoid retyping the password:

  1. scp id_rsa.pub LOGIN@ADDR
  2. Then I connect: ssh LOGIN@ADDR
  3. Type the password.
  4. And copy the public at the right place: cat id_rsa.pub >> .ssh/authorized_keys.
  5. Disconnect.
  6. Reconnect with ssh LOGIN@ADDR and no password is asked.

Finally, I upgrade my packages with the last version:

  1. sudo apt upgrade

And, after lots of minutes, my server is ready to run. I take advantage of this time to add an entry to my /ets/hosts file for an easier access to my server:

ADDR ehome

Category: EHome Tagged: raspberrypi server ubuntu linux