1.Introduction
The procedure to install Ubuntu 18.04 aarch64 (64bit) on RaspberryPi3 is described below.
2.Environment
- Ubuntu 16.04 x86_64
- RaspberryPi3 model B+ (Ubuntu 18.04 aarch64 / Python 3.6)
- microSD card 32GB
3.Procedure
Ubuntu_18.04_image_download
$ curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1SyfrRqX-6KF_KxD4PBVQLT35tgI8Sf58" > /dev/null
$ CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
$ curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1SyfrRqX-6KF_KxD4PBVQLT35tgI8Sf58" -o ubuntu-18.04.3-preinstalled-server-arm64+raspi3.img.xz
$ xz -dv ubuntu-18.04.3-preinstalled-server-arm64+raspi3.img.xz
Download_"Etcher"_image_writing_tool
$ curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1kH4wZiI2rFHhnDXomMJU-dgZwLw2koPQ" > /dev/null
$ CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
$ curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1kH4wZiI2rFHhnDXomMJU-dgZwLw2koPQ" -o balenaEtcher-1.5.57-x64.AppImage
Insert microSD card into SD card reader/writer.
Starting_"Etcher"
$ sudo ./balenaEtcher-1.5.57-x64.AppImage
Insert the microSD card into RaspberryPi and turn on the power. The initial login ID and password is ubuntu / ubuntu
.
Package_updates
$ sudo apt-get update
$ sudo apt-get upgrade
Check_OS_information
$ uname -a
$ cat /etc/lsb-release
Check_resource_usage
$ df -h
$ free
Change_time_zone
$ sudo timedatectl set-timezone Asia/Tokyo
Switch_to_Japanese_keyboard
$ sudo dpkg-reconfigure keyboard-configuration
4.Optional work
4−1.Preparing the development environment with Python
$ sudo apt-get install wget curl git zip unzip python3-pil python3-opencv python3-pip
$ sudo -H pip3 install pip --upgrade
### numpy fast install
$ curl -sc /tmp/cookie "https://drive.google.com/uc?export=download&id=1gRYmhL-mLlA-oLBvhJvzX2pj6tz0nP8y" > /dev/null
$ CODE="$(awk '/_warning_/ {print $NF}' /tmp/cookie)"
$ curl -Lb /tmp/cookie "https://drive.google.com/uc?export=download&confirm=${CODE}&id=1gRYmhL-mLlA-oLBvhJvzX2pj6tz0nP8y" -o numpy-1.17.2-cp36-cp36m-linux_aarch64.whl
$ sudo -H pip3 install numpy-1.17.2-cp36-cp36m-linux_aarch64.whl
$ rm numpy-1.17.2-cp36-cp36m-linux_aarch64.whl
4−2.Install a lightweight Xubuntu desktop GUI environment
Install_Xubuntu_(GUI)
$ sudo apt install tasksel
$ sudo tasksel install xubuntu-desktop
$ sudo reboot
4−3.Expansion of swap area
Setting_swap_space
$ sudo apt-get install -y dphys-swapfile
$ sudo nano /etc/dphys-swapfile
CONF_SWAPSIZE=2048
Ctrl + O
Ctrl + X
Restart_service
$ sudo /etc/init.d/dphys-swapfile restart swapon -s
$ free -h
total used free shared buff/cache available
Mem: 912M 362M 89M 7.3M 460M 527M
Swap: 2.0G 0B 2.0G
4−4.Wi-Fi settings
$ nano /etc/netplan/50-cloud-init.yaml
network:
version: 2
ethernets:
eth0:
dhcp4: true
match:
macaddress: <MAC address>
set-name: eth0
wifis:
wlan0:
access-points:
<SSID>:
password: <Passphrase>
dhcp4: true
dhcp6: true
Ctrl + O
Ctrl + X
$ sudo netplay apply