Ubuntu Commands
Ubuntu version
lsb_release -r
> Release: 20.04
Ubuntu Architecture
https://askubuntu.com/questions/189640/how-to-find-architecture-of-my-pc-and-ubuntu
uname -m
> aarch64
uname -a
> Linux Ubuntu 5.4.0-1042-raspi #46-Ubuntu SMP PREEMPT Fri Jul 20 00:35:40 UTC 2021 aarch64 aarch64 aarch64 GNU/Linux
dpkg --print-architecture
Problems with Wifi
had some issues with basically the wrong password, which can lead you down a rabit hole.
https://bugs.launchpad.net/ubuntu/+source/netplan.io/+bug/1874377
https://linuxconfig.org/ubuntu-20-04-connect-to-wifi-from-command-line
The above have a lot of usefull commands for checking your wifi connection.
What no internet looks like
I've found that generally internet problems with the PI are because
Incorrect password set in network config file and,
Not letting cloud-init to complete as advised when first booting the PI.
You can end up in a dam rabit hole trying to get wifi to work.
https://linuxconfig.org/how-to-configure-static-ip-address-on-ubuntu-18-04-bionic-beaver-linux
https://linuxhint.com/ubuntu_20-04_network_configuration/https://ubuntu.com/tutorials/how-to-install-ubuntu-on-your-raspberry-pi#4-boot-ubuntu-server
ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
link/ether dc:a6:32:57:b9:ba brd ff:ff:ff:ff:ff:ff
3: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether dc:a6:32:57:b9:bb brd ff:ff:ff:ff:ff:ff
Ultimately the fix was to follow the simplest tutorial to setup wifi and keep rebooting until it works.
Basically, a wrong wifi password can look like some of the other issues people have posted, but are infact nothing to do with those. Its just a wrong password, and not rebooting enough, or letting cloud-init time to do its business.
I guess patience is a virtue.
Unattended upgrade
Stop the automatic updater.
sudo dpkg-reconfigure -plow unattended-upgrades
//At the first prompt, choose not to download and install updates.
//Make a reboot.
//Make sure any packages in an unclean state are installed correctly.
sudo dpkg --configure -a
//Get your system up-top-date.
sudo apt update && sudo apt -f install && sudo apt full-upgrade
//Turn the automatic updater back on, now that the blockage is cleared.
sudo dpkg-reconfigure -plow unattended-upgrades
//Select the package unattended-upgrades again.
Keyboard not working
one possible approach I didn't use. https://techwiser.com/fix-keyboard-not-working-in-ubuntu-18-04
After installing ubuntu-keyboard my ubuntu server image boots into the desktop. However the keyboard is disabled, and you can not type the password to login.
As such you need to first emable the onscreen keyboard from the top right menu.
Then once logged in I went to settings, regions and then added the UK keyboard layout. Once added, I moved it to the top of the list, and in the top right corner of the desktop also set it to uk.
Then reboot. Aftwards i can no use the keyboard.
What are my environment Vars?
env
SHELL=/bin/bash
ROS_VERSION=2
ROS_PYTHON_VERSION=3
PWD=/home/ubuntu
LOGNAME=ubuntu
XDG_SESSION_TYPE=tty
MOTD_SHOWN=pam
HOME=/home/ubuntu
LANG=en_US.UTF-8
LS_COLORS=rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*.webm=01;35:*.ogm=01;35:*.mp4=01;35:*.m4v=01;35:*.mp4v=01;35:*.vob=01;35:*.qt=01;35:*.nuv=01;35:*.wmv=01;35:*.asf=01;35:*.rm=01;35:*.rmvb=01;35:*.flc=01;35:*.avi=01;35:*.fli=01;35:*.flv=01;35:*.gl=01;35:*.dl=01;35:*.xcf=01;35:*.xwd=01;35:*.yuv=01;35:*.cgm=01;35:*.emf=01;35:*.ogv=01;35:*.ogx=01;35:*.aac=00;36:*.au=00;36:*.flac=00;36:*.m4a=00;36:*.mid=00;36:*.midi=00;36:*.mka=00;36:*.mp3=00;36:*.mpc=00;36:*.ogg=00;36:*.ra=00;36:*.wav=00;36:*.oga=00;36:*.opus=00;36:*.spx=00;36:*.xspf=00;36:
AMENT_PREFIX_PATH=/opt/ros/foxy
SSH_CONNECTION=192.168.0.29 51144 192.168.0.31 22
LESSCLOSE=/usr/bin/lesspipe %s %s
XDG_SESSION_CLASS=user
PYTHONPATH=/opt/ros/foxy/lib/python3.8/site-packages
TERM=xterm-256color
LESSOPEN=| /usr/bin/lesspipe %s
USER=ubuntu
SHLVL=1
XDG_SESSION_ID=4
LD_LIBRARY_PATH=/opt/ros/foxy/opt/yaml_cpp_vendor/lib:/opt/ros/foxy/opt/rviz_ogre_vendor/lib:/opt/ros/foxy/lib/aarch64-linux-gnu:/opt/ros/foxy/lib
XDG_RUNTIME_DIR=/run/user/1000
ROS_LOCALHOST_ONLY=0
SSH_CLIENT=192.168.0.29 51144 22
XDG_DATA_DIRS=/usr/local/share:/usr/share:/var/lib/snapd/desktop
PATH=/opt/ros/foxy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1000/bus
SSH_TTY=/dev/pts/1
ROS_DISTRO=foxy
_=/usr/bin/env