You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

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 

First Login

  1. The login username is "ubuntu", password is "ubuntu"  (it takes a bit until this user can login)
  2. adduser facet  (for e320pi it is e320)
  3. sudo usermod -a -G sudo facet
  4. sudo reboot now

Update system

  1. sudo apt-get update
  2. sudo apt-get upgrade

In case there are issues with unattended-upgr:

  1. get process id with "ps -e | grep unat
  2. sudo kill -9 "PID"

Internet access via gateway computer

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:

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

Mutual ping on both devices: ping 192.168.0.42 / ping 192.268.0.8

On the pi:

  1. Add route: sudo ip route add default via 192.168.0.42
  2. nano /etc/systemd/resolved.conf
    under "[Resolve]" make sure it reads:
    DNS=1.1.1.1 8.8.8.8
  3. service systemd-resolved restart

On the gateway computer:

  1. Use iptable to do the forwarding:sudo iptables -A FORWARD -o wlo1 -i enx00e04c680dc9 -s 192.168.0.0/255.255.255.0 -m conntrack --ctstate NEW -j ACCEPT (wlo1 is the network interface with internet access)
    sudo iptables -A FORWARD -m conntrack --ctstate ESTABLISHED,RELATED -j ACCEPT
    sudo iptables -t nat -F POSTROUTING
    sudo iptables -t nat -A POSTROUTING -o wlo1 -j MASQUERADE


  • No labels