Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
tools:raspbian [2023/07/02 14:00] darron [Upgrade] |
tools:raspbian [2023/10/05 13:15] darron [WiFi problems] |
||
---|---|---|---|
Line 148: | Line 148: | ||
< | < | ||
apt-get update | apt-get update | ||
- | apt-get | + | apt-get |
</ | </ | ||
Line 269: | Line 269: | ||
+ | ===WiFi problems=== | ||
+ | |||
+ | ==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 | ||
+ | wpa_supplicant runs which results in network failure. | ||
+ | |||
+ | Error looks like this in syslog: | ||
+ | < | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | wpa_supplicant[434]: | ||
+ | </ | ||
+ | |||
+ | To solve this configure / | ||
+ | if this also fails, replace rc.local with the following: | ||
+ | |||
+ | < | ||
+ | #!/bin/sh | ||
+ | # | ||
+ | # rc.local | ||
+ | # | ||
+ | # This script is executed at the end of each multiuser runlevel. | ||
+ | # Make sure that the script will "exit 0" on success or any other | ||
+ | # value on error. | ||
+ | # | ||
+ | # In order to enable or disable this script just change the execution | ||
+ | # bits. | ||
+ | # | ||
+ | |||
+ | check() { | ||
+ | / | ||
+ | } | ||
+ | check | ||
+ | while test $? -eq 1; do | ||
+ | sleep 1 | ||
+ | check | ||
+ | done | ||
+ | ifup wlan0 | ||
+ | |||
+ | # Print the IP address | ||
+ | _IP=$(hostname -I) || true | ||
+ | if [ " | ||
+ | printf "My IP address is %s\n" " | ||
+ | fi | ||
+ | |||
+ | exit 0 | ||
+ | </ | ||
+ | |||
+ | ==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. | ||
+ | |||
+ | < | ||
+ | #! /bin/bash | ||
+ | |||
+ | check() { | ||
+ | LOSS=`ping -c 3 -i 1 192.168.0.1 | awk ' | ||
+ | } | ||
+ | |||
+ | while test 1; do | ||
+ | sleep 30 | ||
+ | check | ||
+ | if test " | ||
+ | ifdown wlan0 1>/ | ||
+ | ifup wlan0 1>/ | ||
+ | sleep 5 | ||
+ | check | ||
+ | if test " | ||
+ | reboot | ||
+ | fi | ||
+ | fi | ||
+ | done | ||
+ | </ | ||
+ | |||
+ | Change the IP address to that of your access point or modem. | ||
=== Upgrade === | === Upgrade === | ||
Line 279: | Line 364: | ||
apt autoclean | apt autoclean | ||
apt clean | apt clean | ||
+ | </ | ||
+ | |||
+ | Remove old pins | ||
+ | |||
+ | < | ||
+ | rm -f / | ||
</ | </ | ||
Line 321: | Line 412: | ||
wget https:// | wget https:// | ||
wget https:// | wget https:// | ||
+ | wget https:// | ||
dpkg -i ./ | dpkg -i ./ | ||
- | dpkg -i ./ | + | dpkg -i ./ |
+ | dpkg -i ./ | ||
</ | </ | ||
Line 329: | Line 422: | ||
- | ===Problems=== | + | ===MicroSD problems=== |
MicroSD cards can be unreliable and often times installed binaries become corrupt. | MicroSD cards can be unreliable and often times installed binaries become corrupt. | ||
Line 366: | Line 459: | ||
Continue from the start until debums reports no errors in binary files. If there are lots of problem it may be sensible to reinstall the OS or use a different sdcard completely. | Continue from the start until debums reports no errors in binary files. If there are lots of problem it may be sensible to reinstall the OS or use a different sdcard completely. | ||
+ | A script | ||
+ | < | ||
+ | #! /bin/bash | ||
+ | PACKAGES=`debsums -s 2>&1 | awk '/ | ||
+ | for PACKAGE in $PACKAGES; do | ||
+ | sudo apt-get install --reinstall " | ||
+ | done | ||
+ | exit 0 | ||
+ | </ | ||
===Kernel=== | ===Kernel=== | ||
Line 643: | Line 745: | ||
===Miscellaneous=== | ===Miscellaneous=== | ||
+ | |||
+ | Install shell | ||
+ | |||
+ | < | ||
+ | apt install tcsh | ||
+ | </ | ||
Install locales | Install locales |