uname -r
The kernel version should >= 4.9.4, if isn't, please follow the script below to update kernel:
sudo rpi-update
sudo reboot
Before you start, make sure ip
command is available on your system. In modern Linux distributions, ip
replaces older ifconfig
command. If net-tools
package (that includes ifconfig
) is not installed and you prefer using it, you can install it via sudo apt-get install net-tools
.
Use touch /home/pi/wifi-reconnect.sh
to create a shell script file,
with the following content:
#!/bin/bash
Most Raspberry Pi operating system images are disk images containing two partitions. A FAT partition with the boot loader and kernel files, and a second Ext4 partition with everything else. We are interested in the second partition.
With a regular Linux desktop computer that has kpartx and mksquashfs installed,
you can convert the second partition to SquashFS like this: