Differences

This shows you the differences between two versions of the page.

Link to this comparison view

tools:raspbian [2023/10/04 19:18] – [WiFi problems] darrontools:raspbian [2025/02/09 20:05] (current) – external edit 127.0.0.1
Line 3: Line 3:
 {{:tools:rpi-imager.jpg?200|RPi imager}} {{:tools:rpi-imager.jpg?200|RPi imager}}
 </wrap> </wrap>
 +
 +This guide is always [[:tools:raspbian-buster|out of date]] in some way due to updates to the core O/S.
  
 === RPi imager === === RPi imager ===
Line 86: Line 88:
 echo "ipv6" >> /mnt/etc/modules echo "ipv6" >> /mnt/etc/modules
 </code> </code>
 +
 +==Bookworm==
 +
 +<code>
 +apt install ifupdown
 +</code>
 +
 +==All==
  
 Restart to login over LAN Restart to login over LAN
Line 201: Line 211:
 <code> <code>
 systemctl disable dhcpcd.service systemctl disable dhcpcd.service
 +</code>
 +
 +==Bookworm==
 +
 +<code>
 +systemctl disable NetworkManager.service
 +systemctl mask NetworkManager.service
 +systemctl stop ModemManager.service
 +systemctl mask ModemManager.service
 </code> </code>
  
Line 271: Line 290:
 ===WiFi problems=== ===WiFi problems===
  
-At least on one setup the WiFI fails to start during boot. It seems that the interface+==Hotplug== 
 + 
 +At least on one setup the WiFi fails to start during boot. It seems that the interface
 has no name as yet or is renamed to something else then renamed back to wlan0 but after has no name as yet or is renamed to something else then renamed back to wlan0 but after
 wpa_supplicant runs which results in network failure. wpa_supplicant runs which results in network failure.
Line 288: Line 309:
 </code> </code>
  
-To solve this configure the interface using "allow-hotplug" but if this +To solve this configure /etc/network/interfaces using "allow-hotplug wlan0"but 
-also fails, replace rc.local with the following:+if this also fails, replace rc.local with the following:
  
 <code> <code>
Line 323: Line 344:
 </code> </code>
  
 +==Keep alive==
 +
 +Pi4 WiFi can both disconnect with wpa_supplicant still running or crash.
 +
 +In the former case we can reconnect but in the latter a reboot is required.
 +
 +<code>
 +#! /bin/bash
 +
 +check() {
 +        LOSS=`ping -c 3 -i 1 192.168.0.1 | awk 'match($0, /[0-9]+%/) { print substr($0, RSTART, RLENGTH) }'`
 +}
 +while test 1; do
 +        sleep 30
 +        check
 +        if test "$LOSS" = "100%"; then
 +                ifdown wlan0 1>/dev/mull 2>/dev/null
 +                ifup   wlan0 1>/dev/null 2>/dev/null
 +                sleep 5
 +                check
 +                if test "$LOSS" = "100%"; then
 +                        reboot
 +                fi
 +        fi
 +done
 +</code>
 +
 +Change the IP address to that of your access point or modem.
 === Upgrade === === Upgrade ===
  
Line 344: Line 393:
  
 EG. EG.
 +
 +to bullseye from buster
  
 <code> <code>
 sed -i 's/buster/bullseye/g' /etc/apt/sources.list sed -i 's/buster/bullseye/g' /etc/apt/sources.list
 </code> </code>
 +
 +or edit for from bullseye to bookworm
 +<code>
 +deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
 +deb http://deb.debian.org/debian-security/ bookworm-security main contrib non-free non-free-firmware
 +deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
 +</code>
 +
 +If keys need importing (if import fails try again, and again)
 +
 +<code>
 +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0E98404D386FA1D9
 +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 6ED0E7B82643E131
 +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com F8D2585B8783D481
 +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 54404762BBB6E853
 +apt-key adv --recv-keys --keyserver keyserver.ubuntu.com BDE6D2B9216EC7A8
 +</code>
 +
  
 Update Update
Line 358: Line 427:
  
 Change RPi sources list Change RPi sources list
 +
  
 <code> <code>
Line 363: Line 433:
 </code> </code>
  
 +or
 +
 +<code>
 +sed -i 's/bullseye/bookworm/g' /etc/apt/sources.list.d/raspi.list
 +</code>
 Update Update