Raspberry Pi/Zero 2W/Ubuntu/24.04: Difference between revisions
Jump to navigation
Jump to search
| Line 569: | Line 569: | ||
|valign='top'| | |valign='top'| | ||
{|class='wikitable mw-collapsible mw-collapsed' style='width:100%;margin:3px 0' | {|class='wikitable mw-collapsible mw-collapsed' style='width:100%;margin:3px 0' | ||
!scope='col' style='text-align:left' colspan='2'| | |||
Install » LXD | |||
|- | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
snap install lxd --channel=6/stable | |||
usermod -aG lxd shahed | |||
EXE | |||
echo 'id -nG' | sudo -i -u shahed bash | |||
</syntaxhighlight> | |||
<syntaxhighlight style='margin:5px 0 3px 0' lang='bash'> | |||
systemctl status ufw | |||
sudo iptables -S | |||
sudo ufw status | |||
</syntaxhighlight> | |||
<syntaxhighlight style='margin:5px 0 3px 0' lang='bash'> | |||
sudo ufw enable | |||
cat << EXE | sudo bash | |||
ufw allow OpenSSH | |||
ufw allow in on lxdbr0 | |||
ufw route allow in on lxdbr0 | |||
ufw route allow out on lxdbr0 | |||
EXE | |||
sudo ufw status numbered | |||
sudo iptables -S | |||
</syntaxhighlight> | |||
<syntaxhighlight style='margin:5px 0 3px 0' lang='bash'> | |||
cat << EXE | sudo bash | |||
snap restart lxd | |||
snap services lxd | |||
EXE | |||
</syntaxhighlight> | |||
<syntaxhighlight style='margin:5px 0 3px 0' lang='bash'> | |||
lxc image ls images:alpine | |||
lxc launch images:alpine/3.23 academia | |||
lxc exec academia -- sh -c 'ping -c5 chorke.org' | |||
lxc exec academia -- sh -c 'ping -c5 shahed.biz' | |||
</syntaxhighlight> | |||
|valign='top' style='width:50%'| | |||
<syntaxhighlight style='margin:3px 0' lang='yaml'> | |||
cat <<'YML' | sudo lxd init --preseed | |||
--- | |||
config: {} | |||
networks: | |||
- config: | |||
ipv4.address: 10.20.0.1/24 | |||
ipv4.nat: "true" | |||
ipv6.address: auto | |||
description: "" | |||
name: lxdbr0 | |||
type: "" | |||
project: default | |||
storage_pools: | |||
- config: | |||
size: 5GiB | |||
description: "" | |||
name: lxd-zfs-pool-aa | |||
driver: zfs | |||
storage_volumes: [] | |||
profiles: | |||
- config: {} | |||
description: "" | |||
devices: | |||
eth0: | |||
name: eth0 | |||
network: lxdbr0 | |||
type: nic | |||
root: | |||
path: / | |||
pool: lxd-zfs-pool-aa | |||
type: disk | |||
name: default | |||
projects: [] | |||
cluster: null | |||
YML | |||
</syntaxhighlight> | |||
|} | |||
{|class='wikitable mw-collapsible mw-collapsed' style='width:100%;margin:6px 0 3px 0' | |||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Install » Docker | Install » Docker | ||
Revision as of 08:57, 30 December 2025
lsblk
:'
sdb 8:16 1 29.8G 0 disk
├─sdb1 8:17 1 512M 0 part /media/shahed/system-boot
└─sdb2 8:18 1 29.3G 0 part /media/shahed/writable
'
|
ls -alh /media/${USER}/system-boot/{ssh,{config,cmdline}.txt}
:'
-rw-r--r-- 1 shahed shahed 170 Dec 30 01:03 /media/shahed/system-boot/cmdline.txt
-rw-r--r-- 1 shahed shahed 1.8K Dec 29 21:13 /media/shahed/system-boot/config.txt
-rw-r--r-- 1 shahed shahed 0 Dec 29 17:45 /media/shahed/system-boot/ssh
'
| ||||||
ls -lah /media/${USER}/writable/etc/netplan/
:'
total 12K
drwxr-xr-x 2 root root 4.0K Dec 30 08:29 .
drwxr-xr-x 108 root root 4.0K Dec 29 20:55 ..
-rw------- 1 root root 262 Dec 29 17:22 50-cloud-init.yaml
'
|
ls -lah /media/${USER}/writable/etc/udev/rules.d/
:'
total 72K
drwxr-xr-x 2 root root 4.0K Aug 6 01:00 .
drwxr-xr-x 4 root root 4.0K Dec 29 20:47 ..
-rw-r--r-- 1 root root 62K Aug 6 01:00 70-snap.snapd.rules
'
| ||||||
| |||||||
SD Card » Pre-Boot
|
SD Card » Pre-Boot | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
SD Card » Post-Boot
|
SD Card » Post-Boot | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
Host » Ethernet » USB0
|
Host » Ethernet » USB0 | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||
Utility » Install
|
Utility » Install | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||
References
|
References | ||
|---|---|---|