Raspberry Pi/Zero 2W/Ubuntu/24.04: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
|||
| (4 intermediate revisions by the same user not shown) | |||
| Line 1: | Line 1: | ||
{|class='wikitable | {|class='wikitable' | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
lsblk | lsblk | ||
:' | :' | ||
| Line 10: | Line 10: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ls -alh /media/${USER}/system-boot/{ssh,{config,cmdline}.txt} | ls -alh /media/${USER}/system-boot/{ssh,{config,cmdline}.txt} | ||
:' | :' | ||
| Line 20: | Line 20: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ls -lah /media/${USER}/writable/etc/netplan/ | ls -lah /media/${USER}/writable/etc/netplan/ | ||
:' | :' | ||
| Line 30: | Line 30: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ls -lah /media/${USER}/writable/etc/udev/rules.d/ | ls -lah /media/${USER}/writable/etc/udev/rules.d/ | ||
:' | :' | ||
| Line 41: | Line 41: | ||
|- | |- | ||
|valign='top' colspan='2'| | |valign='top' colspan='2'| | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
system-boot » config.txt | system-boot » config.txt | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
cat /media/${USER}/system-boot/config.txt && echo | cat /media/${USER}/system-boot/config.txt && echo | ||
<<-'TXT' | <<-'TXT' | ||
| Line 113: | Line 113: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
system-boot » cmdline.txt | system-boot » cmdline.txt | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
cat /media/${USER}/system-boot/cmdline.txt && echo | cat /media/${USER}/system-boot/cmdline.txt && echo | ||
:' | :' | ||
| Line 128: | Line 128: | ||
==SD Card » Pre-Boot== | ==SD Card » Pre-Boot== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
SD Card » Pre-Boot | SD Card » Pre-Boot | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
system-boot » config.txt | system-boot » config.txt | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
cat <<'INI' | tee -a /media/${USER}/system-boot/config.txt >/dev/null | cat <<'INI' | tee -a /media/${USER}/system-boot/config.txt >/dev/null | ||
dtoverlay=dwc2 | dtoverlay=dwc2 | ||
| Line 148: | Line 148: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
lsmod | grep -E 'dwc2|g_ether' | lsmod | grep -E 'dwc2|g_ether' | ||
dmesg | grep -E 'dwc2' | dmesg | grep -E 'dwc2' | ||
| Line 158: | Line 158: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
system-boot » cmdline.txt | system-boot » cmdline.txt | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
# modules-load=dwc2 | # modules-load=dwc2 | ||
| Line 172: | Line 172: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
# modules-load=dwc2,g_ether | # modules-load=dwc2,g_ether | ||
| Line 181: | Line 181: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
# modules-load=dwc2,g_ether | # modules-load=dwc2,g_ether | ||
# g_ether.host_addr=12:a5:cf:42:92:fd | # g_ether.host_addr=12:a5:cf:42:92:fd | ||
| Line 191: | Line 191: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
writable » 10-usb-wan.yaml | writable » 10-usb-wan.yaml | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='yaml'> | ||
ls -lah /media/${USER}/writable/etc/netplan/ | ls -lah /media/${USER}/writable/etc/netplan/ | ||
cat <<'YML' | sudo /media/${USER}/writable/etc/netplan/10-usb-wan.yaml >/dev/null | cat <<'YML' | sudo /media/${USER}/writable/etc/netplan/10-usb-wan.yaml >/dev/null | ||
| Line 221: | Line 221: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo netplan try --timeout 60 | sudo netplan try --timeout 60 | ||
sudo netplan generate | sudo netplan generate | ||
| Line 245: | Line 245: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
writable » 99-usb-gadget.yaml | writable » 99-usb-gadget.yaml | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='yaml'> | ||
ls -lah /media/${USER}/writable/etc/netplan/ | ls -lah /media/${USER}/writable/etc/netplan/ | ||
cat <<'YML' | sudo tee /media/${USER}/writable/etc/netplan/99-usb-gadget.yaml >/dev/null | cat <<'YML' | sudo tee /media/${USER}/writable/etc/netplan/99-usb-gadget.yaml >/dev/null | ||
| Line 268: | Line 268: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo netplan try --timeout 60 | sudo netplan try --timeout 60 | ||
sudo netplan generate | sudo netplan generate | ||
| Line 285: | Line 285: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
writable » 70-usb-gadget-net.rules | writable » 70-usb-gadget-net.rules | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
ls -lah /media/${USER}/writable/etc/udev/rules.d/ | ls -lah /media/${USER}/writable/etc/udev/rules.d/ | ||
cat <<'INI' | sudo tee /media/${USER}/writable/etc/udev/rules.d/70-usb-gadget-net.rules >/dev/null | cat <<'INI' | sudo tee /media/${USER}/writable/etc/udev/rules.d/70-usb-gadget-net.rules >/dev/null | ||
| Line 300: | Line 300: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo udevadm control --reload | sudo udevadm control --reload | ||
sudo udevadm trigger | sudo udevadm trigger | ||
| Line 312: | Line 312: | ||
==SD Card » Post-Boot== | ==SD Card » Post-Boot== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
SD Card » Post-Boot | SD Card » Post-Boot | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Post-Boot » Swapfile | Post-Boot » Swapfile | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat <<'EXE' | sudo bash | cat <<'EXE' | sudo bash | ||
swapoff /swapfile | swapoff /swapfile | ||
| Line 331: | Line 331: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat << FST | sudo tee -a /etc/fstab >/dev/null | cat << FST | sudo tee -a /etc/fstab >/dev/null | ||
# Loopback Swap Space » 512Mi + 512Mi | # Loopback Swap Space » 512Mi + 512Mi | ||
| Line 340: | Line 340: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Post-Boot » 10-usb-wan.yaml | Post-Boot » 10-usb-wan.yaml | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='yaml'> | ||
ls -lah /etc/netplan/ | ls -lah /etc/netplan/ | ||
cat <<'YML' | sudo /etc/netplan/10-usb-wan.yaml >/dev/null | cat <<'YML' | sudo /etc/netplan/10-usb-wan.yaml >/dev/null | ||
| Line 370: | Line 370: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo netplan try --timeout 60 | sudo netplan try --timeout 60 | ||
sudo netplan generate | sudo netplan generate | ||
| Line 394: | Line 394: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Post-Boot » 99-usb-gadget.yaml | Post-Boot » 99-usb-gadget.yaml | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='yaml'> | ||
ls -lah /etc/netplan/ | ls -lah /etc/netplan/ | ||
cat <<'YML' | sudo tee /etc/netplan/99-usb-gadget.yaml >/dev/null | cat <<'YML' | sudo tee /etc/netplan/99-usb-gadget.yaml >/dev/null | ||
| Line 417: | Line 417: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo netplan try --timeout 60 | sudo netplan try --timeout 60 | ||
sudo netplan generate | sudo netplan generate | ||
| Line 434: | Line 434: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Post-Boot » 70-usb-gadget-net.rules | Post-Boot » 70-usb-gadget-net.rules | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
ls -lah /etc/udev/rules.d/ | ls -lah /etc/udev/rules.d/ | ||
cat <<'INI' | sudo tee /etc/udev/rules.d/70-usb-gadget-net.rules >/dev/null | cat <<'INI' | sudo tee /etc/udev/rules.d/70-usb-gadget-net.rules >/dev/null | ||
| Line 449: | Line 449: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo udevadm control --reload | sudo udevadm control --reload | ||
sudo udevadm trigger | sudo udevadm trigger | ||
| Line 461: | Line 461: | ||
==Host » Ethernet » USB0== | ==Host » Ethernet » USB0== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
Host » Ethernet » USB0 | Host » Ethernet » USB0 | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Host » 70-pi-usb-net.rules | Host » 70-pi-usb-net.rules | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
ls -lah /etc/udev/rules.d/ | ls -lah /etc/udev/rules.d/ | ||
cat <<'INI' | sudo tee /etc/udev/rules.d/70-pi-usb-net.rules >/dev/null | cat <<'INI' | sudo tee /etc/udev/rules.d/70-pi-usb-net.rules >/dev/null | ||
| Line 481: | Line 481: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo udevadm control --reload | sudo udevadm control --reload | ||
sudo udevadm trigger | sudo udevadm trigger | ||
| Line 490: | Line 490: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Host » 20-usb0.network » Match » MAC | Host » 20-usb0.network » Match » MAC | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
ls -lah /etc/systemd/network/ | ls -lah /etc/systemd/network/ | ||
cat <<'INI' | sudo tee /etc/systemd/network/20-usb0.network >/dev/null | cat <<'INI' | sudo tee /etc/systemd/network/20-usb0.network >/dev/null | ||
| Line 509: | Line 509: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ls -l /etc/systemd/network/20-usb0.network | ls -l /etc/systemd/network/20-usb0.network | ||
sudo systemctl restart systemd-networkd | sudo systemctl restart systemd-networkd | ||
| Line 522: | Line 522: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Host » 20-usb0.network » Match » Name | Host » 20-usb0.network » Match » Name | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='ini'> | ||
ls -lah /etc/systemd/network/ | ls -lah /etc/systemd/network/ | ||
cat <<'INI' | sudo tee /etc/systemd/network/20-usb0.network >/dev/null | cat <<'INI' | sudo tee /etc/systemd/network/20-usb0.network >/dev/null | ||
| Line 544: | Line 544: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ls -l /etc/systemd/network/20-usb0.network | ls -l /etc/systemd/network/20-usb0.network | ||
sudo systemctl restart systemd-networkd | sudo systemctl restart systemd-networkd | ||
| Line 563: | Line 563: | ||
==Utility » Install== | ==Utility » Install== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left'| | !scope='col' style='text-align:left'| | ||
Utility » Install | Utility » Install | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Install » LXD | Install » LXD | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
snap install lxd --channel=6/stable | snap install lxd --channel=6/stable | ||
| Line 612: | Line 612: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='yaml'> | ||
cat <<'YML' | sudo lxd init --preseed | cat <<'YML' | sudo lxd init --preseed | ||
--- | --- | ||
| Line 650: | Line 650: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Install » Docker | Install » Docker | ||
|- | |- | ||
|valign='top' colspan='2'| | |valign='top' colspan='2'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
curl -fsSL https://download.docker.com/linux/ubuntu/gpg \ | curl -fsSL https://download.docker.com/linux/ubuntu/gpg \ | ||
| sudo tee /etc/apt/keyrings/docker.asc >/dev/null | | sudo tee /etc/apt/keyrings/docker.asc >/dev/null | ||
| Line 666: | Line 666: | ||
|- | |- | ||
|valign='top' colspan='2'| | |valign='top' colspan='2'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
apt-get update;echo | apt-get update;echo | ||
| Line 677: | Line 677: | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='json'> | ||
cat << EOF | sudo tee /etc/docker/daemon.json >/dev/null | cat << EOF | sudo tee /etc/docker/daemon.json >/dev/null | ||
{ | { | ||
| Line 694: | Line 694: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
systemctl stop docker.socket | systemctl stop docker.socket | ||
| Line 704: | Line 704: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
docker network ls | docker network ls | ||
echo 'id -nG' | sudo -i -u shahed bash | echo 'id -nG' | sudo -i -u shahed bash | ||
| Line 714: | Line 714: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Install » Pi-hole | Install » Pi-hole | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
ssh -i ~/.ssh/cid.chorke.org_ed25519 -qt shahed@192.168.10.2 bash | ssh -i ~/.ssh/cid.chorke.org_ed25519 -qt shahed@192.168.10.2 bash | ||
sudo su | sudo su | ||
| Line 730: | Line 730: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat << EXE | sudo bash | cat << EXE | sudo bash | ||
ufw allow 53 | ufw allow 53 | ||
| Line 741: | Line 741: | ||
|- | |- | ||
|valign='top' colspan='2'| | |valign='top' colspan='2'| | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Pi-hole » Config | Pi-hole » Config | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config dns.upstreams | sudo pihole-FTL --config dns.upstreams | ||
| Line 757: | Line 757: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config dns.revServers | sudo pihole-FTL --config dns.revServers | ||
| Line 768: | Line 768: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config dns.hosts | sudo pihole-FTL --config dns.hosts | ||
| Line 789: | Line 789: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config misc.dnsmasq_lines | sudo pihole-FTL --config misc.dnsmasq_lines | ||
| Line 810: | Line 810: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config dns.cnameRecords | sudo pihole-FTL --config dns.cnameRecords | ||
| Line 834: | Line 834: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config misc.etc_dnsmasq_d | sudo pihole-FTL --config misc.etc_dnsmasq_d | ||
| Line 857: | Line 857: | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
{|class='wikitable mw-collapsible mw-collapsed | {|class='wikitable mw-collapsible mw-collapsed' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Pi-hole » Config » Legacy | Pi-hole » Config » Legacy | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo;\ | echo;\ | ||
sudo cat /etc/addn-hosts; | sudo cat /etc/addn-hosts; | ||
| Line 884: | Line 884: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo;\ | echo;\ | ||
sudo cat /etc/dnsmasq.d/02-custom.conf; | sudo cat /etc/dnsmasq.d/02-custom.conf; | ||
| Line 906: | Line 906: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo;\ | echo;\ | ||
sudo cat /etc/dnsmasq.d/05-pihole-custom-cname.conf; | sudo cat /etc/dnsmasq.d/05-pihole-custom-cname.conf; | ||
| Line 930: | Line 930: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config misc.etc_dnsmasq_d | sudo pihole-FTL --config misc.etc_dnsmasq_d | ||
| Line 957: | Line 957: | ||
==Playground== | ==Playground== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='2'| | !scope='col' style='text-align:left' colspan='2'| | ||
Playground | Playground | ||
|- | |- | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mIsolation:\e[0m\n:' | printf '\n\e[1;37mIsolation:\e[0m\n:' | ||
sudo pihole-FTL --config webserver.port | sudo pihole-FTL --config webserver.port | ||
| Line 969: | Line 969: | ||
|valign='top' style='width:50%'| | |valign='top' style='width:50%'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config webserver.port | sudo pihole-FTL --config webserver.port | ||
| Line 976: | Line 976: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config misc.etc_dnsmasq_d | sudo pihole-FTL --config misc.etc_dnsmasq_d | ||
| Line 983: | Line 983: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
echo ;\ | echo ;\ | ||
sudo pihole-FTL --config misc.etc_dnsmasq_d | sudo pihole-FTL --config misc.etc_dnsmasq_d | ||
| Line 990: | Line 990: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config dns.cnameRecords | sudo pihole-FTL --config dns.cnameRecords | ||
| Line 997: | Line 997: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config misc.dnsmasq_lines | sudo pihole-FTL --config misc.dnsmasq_lines | ||
| Line 1,004: | Line 1,004: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config dns.hosts | sudo pihole-FTL --config dns.hosts | ||
| Line 1,011: | Line 1,011: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
printf '\n\e[1;37mCompatibility:\e[0m\n:' | printf '\n\e[1;37mCompatibility:\e[0m\n:' | ||
sudo pihole-FTL --config dns.hosts | sudo pihole-FTL --config dns.hosts | ||
| Line 1,018: | Line 1,018: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo systemctl restart pihole-FTL | sudo systemctl restart pihole-FTL | ||
sudo pihole networkflush | sudo pihole networkflush | ||
| Line 1,026: | Line 1,026: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
sudo cat /etc/pihole/migration_backup/adlists.list | sudo cat /etc/pihole/migration_backup/adlists.list | ||
sudo cat /etc/pihole/hosts/custom.list | sudo cat /etc/pihole/hosts/custom.list | ||
| Line 1,034: | Line 1,034: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
# pihole » domain » list » allow | # pihole » domain » list » allow | ||
sudo pihole allow gitlab.shahed.biz | sudo pihole allow gitlab.shahed.biz | ||
| Line 1,042: | Line 1,042: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
# pihole » domain » list » allow » delete | # pihole » domain » list » allow » delete | ||
sudo pihole allow gitlab.shahed.biz -d | sudo pihole allow gitlab.shahed.biz -d | ||
| Line 1,051: | Line 1,051: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
# pihole » domain » list » allow » wild | # pihole » domain » list » allow » wild | ||
sudo pihole --allow-wild shahed.biz | sudo pihole --allow-wild shahed.biz | ||
| Line 1,059: | Line 1,059: | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
# pihole » domain » list » allow » wild » delete | # pihole » domain » list » allow » wild » delete | ||
sudo pihole --allow-wild shahed.biz -d | sudo pihole --allow-wild shahed.biz -d | ||
| Line 1,068: | Line 1,068: | ||
|- | |- | ||
|valign='top'| | |valign='top'| | ||
<syntaxhighlight | <syntaxhighlight lang='bash'> | ||
cat <<'EXE' | sudo bash | cat <<'EXE' | sudo bash | ||
echo | echo | ||
while read -r domain; do | while read -r domain; do | ||
pihole --allow-wild ${domain} || true | pihole --allow-wild ${domain} || true | ||
done <<'DNS' | done <<'DNS' | ||
cloudflareinsights.com | cloudflareinsights.com | ||
cloudflareclient.com | cloudflareclient.com | ||
alpinelinux.org | |||
finology.com.my | |||
xpresscover.io | |||
loanstreet.my | |||
DNS | |||
echo ; pihole --allow-wild -l | |||
echo ; pihole allow -l | |||
echo ; pihole reloaddns | |||
EXE | |||
</syntaxhighlight> | |||
|valign='top'| | |||
<syntaxhighlight lang='bash'> | |||
cat <<'EXE' | sudo bash | |||
echo | |||
while read -r domain; do | |||
pihole --allow-wild ${domain} || true | |||
done <<'DNS' | |||
snapcraft.io | |||
bmet.gov.bd | bmet.gov.bd | ||
chorke.com | chorke.com | ||
chorke.org | chorke.org | ||
github.com | |||
shahed.biz | shahed.biz | ||
DNS | DNS | ||
pihole allow -l | echo ; pihole --allow-wild -l | ||
pihole | echo ; pihole allow -l | ||
echo ; pihole reloaddns | |||
EXE | EXE | ||
</syntaxhighlight> | </syntaxhighlight> | ||
|} | |} | ||
==References== | ==References== | ||
{|class='wikitable mw-collapsible | {|class='wikitable mw-collapsible' | ||
!scope='col' style='text-align:left' colspan='3'| | !scope='col' style='text-align:left' colspan='3'| | ||
References | References | ||
|- | |- | ||
|valign='top' style='width:33%'| | |valign='top' style='width:33%'| | ||
* [[Raspberry Pi/5 16GB/Debian/13|Raspberry Pi » 5 16GB » Debian » 13]] | |||
* [https://downloads.raspberrypi.com/imager/ Raspberry Pi » Download] | * [https://downloads.raspberrypi.com/imager/ Raspberry Pi » Download] | ||
* [https://www.raspberrypi.com/software/ Raspberry Pi] | * [https://www.raspberrypi.com/software/ Raspberry Pi] | ||
Latest revision as of 00:48, 19 January 2026
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 | ||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||
Playground
|
Playground | |
|---|---|
printf '\n\e[1;37mIsolation:\e[0m\n:'
sudo pihole-FTL --config webserver.port
sudo pihole-FTL --config webserver.port "127.0.0.1:8080"
|
echo ;\
sudo pihole-FTL --config webserver.port
sudo pihole-FTL --config webserver.port "80o,443os,[::]:80o,[::]:443os"
|
printf '\n\e[1;37mCompatibility:\e[0m\n:'
sudo pihole-FTL --config misc.etc_dnsmasq_d
sudo pihole-FTL --config misc.etc_dnsmasq_d true
|
echo ;\
sudo pihole-FTL --config misc.etc_dnsmasq_d
sudo pihole-FTL --config misc.etc_dnsmasq_d false
|
printf '\n\e[1;37mCompatibility:\e[0m\n:'
sudo pihole-FTL --config dns.cnameRecords
sudo cat /etc/dnsmasq.d/05-pihole-custom-cname.conf
|
printf '\n\e[1;37mCompatibility:\e[0m\n:'
sudo pihole-FTL --config misc.dnsmasq_lines
sudo cat /etc/dnsmasq.d/02-custom.conf
|
printf '\n\e[1;37mCompatibility:\e[0m\n:'
sudo pihole-FTL --config dns.hosts
sudo cat /etc/pihole/hosts/custom.list
|
printf '\n\e[1;37mCompatibility:\e[0m\n:'
sudo pihole-FTL --config dns.hosts
sudo cat /etc/addn-hosts
|
sudo systemctl restart pihole-FTL
sudo pihole networkflush
sudo pihole reloadlists
sudo pihole reloaddns
|
sudo cat /etc/pihole/migration_backup/adlists.list
sudo cat /etc/pihole/hosts/custom.list
sudo cat /etc/pihole/dnsmasq.conf
sudo cat /etc/pihole/pihole.toml
|
# pihole » domain » list » allow
sudo pihole allow gitlab.shahed.biz
sudo pihole reloaddns
sudo pihole allow -l
|
# pihole » domain » list » allow » delete
sudo pihole allow gitlab.shahed.biz -d
sudo pihole reloaddns
sudo pihole allow -l
|
# pihole » domain » list » allow » wild
sudo pihole --allow-wild shahed.biz
sudo pihole --allow-wild -l
sudo pihole reloaddns
|
# pihole » domain » list » allow » wild » delete
sudo pihole --allow-wild shahed.biz -d
sudo pihole --allow-wild -l
sudo pihole reloaddns
|
cat <<'EXE' | sudo bash
echo
while read -r domain; do
pihole --allow-wild ${domain} || true
done <<'DNS'
cloudflareinsights.com
cloudflareclient.com
alpinelinux.org
finology.com.my
xpresscover.io
loanstreet.my
DNS
echo ; pihole --allow-wild -l
echo ; pihole allow -l
echo ; pihole reloaddns
EXE
|
cat <<'EXE' | sudo bash
echo
while read -r domain; do
pihole --allow-wild ${domain} || true
done <<'DNS'
snapcraft.io
bmet.gov.bd
chorke.com
chorke.org
github.com
shahed.biz
DNS
echo ; pihole --allow-wild -l
echo ; pihole allow -l
echo ; pihole reloaddns
EXE
|
References
|
References | ||
|---|---|---|