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-02-01 17:46] – updating plays gabriel | ubuntu:pi [2021-02-08 16:27] (current) – [Configuring RTC on Ubuntu 20.04 LTS] formatting gabriel | ||
---|---|---|---|
Line 47: | Line 47: | ||
< | < | ||
+ | # disable the unattended upgrades service (you can re-enable later if you prefer) | ||
systemctl disable unattended-upgrades | systemctl disable unattended-upgrades | ||
+ | |||
+ | # install python for Ansible | ||
apt install python | apt install python | ||
+ | |||
+ | # set editor to Vim (optional) | ||
update-alternatives --config editor | update-alternatives --config editor | ||
+ | |||
+ | # set a hostname | ||
echo " | echo " | ||
+ | |||
# don't forget to update /etc/hosts | # don't forget to update /etc/hosts | ||
</ | </ | ||
Line 64: | Line 72: | ||
eth0: | eth0: | ||
addresses: | addresses: | ||
- | - 10.1.2.1/24 | + | - 10.1.2.3/24 |
gateway4: 10.1.2.1 | gateway4: 10.1.2.1 | ||
link-local: [ ] | link-local: [ ] | ||
Line 70: | Line 78: | ||
search: [subnet.quay.net, | search: [subnet.quay.net, | ||
addresses: | addresses: | ||
- | - 10.1.2.3 | + | - 10.1.2.53 |
</ | </ | ||
- | To test this: | + | Test netplan configuration: |
< | < | ||
netplan try | netplan try | ||
+ | |||
# if that works, remove any other config files and run: | # if that works, remove any other config files and run: | ||
netplay apply | netplay apply | ||
+ | |||
+ | # once successfully tested you should also remove the default config from cloud-init | ||
+ | # (add to Ansible playbook in future) | ||
+ | rm -f / | ||
</ | </ | ||
- | ==== Ansible | + | ==== Ansible |
< | < | ||
# standard configuration for all Raspberry Pi systems | # 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 | ansible-playbook -l raspi.in.quay.net raspi_ubuntu.yml | ||
Line 102: | 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.1612219613.txt.gz · Last modified: 2021-02-01 17:46 by gabriel