ubuntu:pi
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ubuntu:pi [2021-01-24 10:48] – partition tip gabriel | ubuntu:pi [2021-02-08 16:27] (current) – [Configuring RTC on Ubuntu 20.04 LTS] formatting gabriel | ||
---|---|---|---|
Line 46: | Line 46: | ||
Next do the following: | Next do the following: | ||
- | * disable unattended-upgrades | + | < |
- | * set hostname | + | # disable the unattended upgrades service (you can re-enable later if you prefer) |
- | | + | systemctl |
- | * configure | + | |
- | | + | # install python for Ansible |
+ | apt install python | ||
+ | |||
+ | # set editor to Vim (optional) | ||
+ | update-alternatives --config editor | ||
+ | |||
+ | # set a hostname | ||
+ | echo " | ||
+ | |||
+ | # don't forget to update / | ||
+ | </ | ||
+ | |||
+ | Configure | ||
+ | |||
+ | < | ||
+ | # / | ||
+ | network: | ||
+ | version: 2 | ||
+ | renderer: networkd | ||
+ | ethernets: | ||
+ | eth0: | ||
+ | addresses: | ||
+ | - 10.1.2.3/ | ||
+ | gateway4: 10.1.2.1 | ||
+ | link-local: [ ] | ||
+ | nameservers: | ||
+ | search: [subnet.quay.net, | ||
+ | addresses: | ||
+ | - 10.1.2.53 | ||
+ | </ | ||
+ | |||
+ | Test netplan configuration: | ||
+ | |||
+ | < | ||
+ | netplan try | ||
+ | |||
+ | # if that works, remove any other config files and run: | ||
+ | netplay apply | ||
+ | |||
+ | # once successfully tested you should also remove the default config from cloud-init | ||
+ | # (add to Ansible playbook in future) | ||
+ | rm -f / | ||
+ | </ | ||
+ | |||
+ | ==== Ansible playbooks ==== | ||
+ | |||
+ | < | ||
+ | # standard configuration for all Raspberry Pi systems | ||
+ | # this playbook does the following: | ||
+ | # - base configurations (raspi_ubuntu) | ||
+ | # - time service config (chrony) | ||
+ | # - firewall config (nftables) | ||
+ | ansible-playbook -l raspi.in.quay.net raspi_ubuntu.yml | ||
+ | |||
+ | # regenerate SSHD keys on host after build | ||
+ | # NOTE: Ubuntu ships with a default set of SSHD keys | ||
+ | ansible-playbook | ||
+ | </ | ||
Add the following to Ansible plays in the future: | Add the following to Ansible plays in the future: | ||
- | * disable ipv6 | ||
- | * timezone | ||
* default editor | * default editor | ||
* prune packages | * prune packages | ||
- | * sshd config | ||
- | * disable ubuntu account or remove | ||
* configre motd | * configre motd | ||
* apt install lm-sensors | * apt install lm-sensors | ||
Line 66: | Line 119: | ||
Quick reference for Raspberry Pi hardware tools on Ubuntu. | Quick reference for Raspberry Pi hardware tools on Ubuntu. | ||
+ | |||
+ | ==== Configuring RTC on Ubuntu 20.04 LTS ==== | ||
+ | |||
+ | < | ||
+ | # Install the I2C tools to access the bus and configure your RTC | ||
+ | apt install i2c-tools | ||
+ | |||
+ | # Enable your RTC in the Pi boot config | ||
+ | RTCMODEL=ds3231 | ||
+ | echo " | ||
+ | |||
+ | # show I2C bus config | ||
+ | # - 68 = hardware detected | ||
+ | # - UU = dtoverlay configured correctly and driver is loaded | ||
+ | i2cdetect -y 1 | ||
+ | </ | ||
+ | |||
+ | // | ||
===== Reference ===== | ===== Reference ===== |
ubuntu/pi.1611503287.txt.gz · Last modified: 2021-01-24 10:48 by gabriel