Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Installation 2023, Dec 15-17

  • Old SD card seemed corrupted
  • New installation necessary

https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi

Image Added

As soon as there is a connection to an ubuntu server: upgrade system

  • sudo apt update
  • sudo apt upgrade
  • sudo apt dist-upgrade
    (repeat after restart)

Install software:

  • sudo apt install build-essential
  • sudo apt install libboost-all-dev
  • sudo apt install libusb-1.0-0-dev
  • sudo apt install libv4l-dev
  • sudo apt install libopencv-dev



Old notes

Prepare SDCARD

  1. Download image: https://ubuntu.com/download/raspberry-pi
    https://cdimage.ubuntu.com/releases/20.04/release/ubuntu-20.04.4-preinstalled-server-arm64+raspi.img.xz
  2. Unzip the image: unxz ubuntu-22.04-preinstalled-server-arm64+raspi.img.xz
  3. Insert SDCARD, find where it is: lsblk -p
  4. MAKE SURE YOU HAVE THE CORRECT DEVICE!:
    sudo dd if=ubuntu-22.04-preinstalled-server-arm64+raspi.img of=/dev/sdc  bs=4M conv=fsync 

...

  • nano /etc/systemd/resolved.conf
    [Resolve]
  • DNS=1.1.1.1 8.8.8.8
  • service systemd-resolved restart
  • systemd-resolve --status

Change hostname

hostnamectl set-hostname new-hostname

Enable ssh

  1. sudo apt install ssh
  2. sudo systemctl enable --now ssh
  3. sudo systemctl status ssh

...

  1. sudo ufw default deny incoming
  2. sudo ufw default allow outgoing
  3. sudo ufw allow ssh
  4. sudo ufw enable

Internet access via gateway computer


Test

Connect the pi with a crossover cable to an ethernet adapter on a "gateway computer"

Install DHCP server on gateway computer:

subnet 192.168.110.0 netmask 255.255.255.0 {
range 192.168.110.200 192.168.110.250;
}

  • Check: sudo systemctl status isc-dhcp-server.service
    Image Added
  • ssh e320@172.25.77.100: connection should be possible
  • sysctl -w net.ipv4.ip_forward=1

Old notes

Connect pi with, e.g., USB3-Ethernet adapter to laptop via cross-over cable or network switch. On the pi:

  1. ip a (to list network interfaces)
  2. sudo ip addr add 192.168.0.8/255.255.255.0 dev eth0  (with correct device name for above)

On the gateway computer:

  • Install DHCP server
  1. ip a
  2. sudo ip addr add 192.168.0.42/255.255.255.0 dev enx00e04c680dc9 (with correct device name for above)

...