cloyne / network

5 stars 5 forks source link

Upgrade APs to latest firmware #34

Closed mitar closed 9 years ago

mitar commented 9 years ago

Currently we have a firmware from October 2014 April 2015.

mitar commented 9 years ago

Using the openwrt-builder Docker image, tag v329c551_bb_ar71xx (see documentation), I run a docker container with it, and exec into it:

docker exec -t -i builder-openwrt-v329c551-bb-ar71xx bash

Then to compile the images:

cd /builder/imagebuilder
su builder

make image PROFILE="UAPPRO" PACKAGES="wireless-tools wpad-mini kmod-netem kmod-pktgen ntpclient qos-scripts iperf horst wireless-info cronscripts iwinfo nodewatcher-agent nodewatcher-agent-mod-general nodewatcher-agent-mod-resources nodewatcher-agent-mod-interfaces nodewatcher-agent-mod-wireless nodewatcher-agent-mod-keys_ssh nodewatcher-agent-mod-clients uhttpd ip-full"

make image PROFILE="TLWR1043" PACKAGES="wireless-tools wpad-mini kmod-netem kmod-pktgen ntpclient qos-scripts iperf horst wireless-info cronscripts iwinfo nodewatcher-agent nodewatcher-agent-mod-general nodewatcher-agent-mod-resources nodewatcher-agent-mod-interfaces nodewatcher-agent-mod-wireless nodewatcher-agent-mod-keys_ssh nodewatcher-agent-mod-clients uhttpd ip-full"

cd bin/ar71xx

The files we want are:

You use factory image when you are installing OpenWrt for the first time. And sysupgrade when you are upgrading an existing OpenWrt installation.

From the Docker host:

docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-ubnt-uap-pro-squashfs-factory.bin .
docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-ubnt-uap-pro-squashfs-sysupgrade.bin .
docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-factory.bin .
docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v1-squashfs-sysupgrade.bin .
docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-factory.bin .
docker cp builder-openwrt-v329c551-bb-ar71xx:/builder/imagebuilder/bin/ar71xx/openwrt-ar71xx-generic-tl-wr1043nd-v2-squashfs-sysupgrade.bin .

These now are from March 2015.

Added them to this git repository.

When you are upgrading firmware, you have to make sure that you are using the right firmware. You can get device model of the AP you are logged on with:

cat /proc/cpuinfo | grep machine

You copy the firmware file over:

scp openwrt-ar71xx-generic<...>sysupgrade.bin root@<ip>:/tmp

And on the device you should first check that /etc/sysupgrade.conf contains:

/etc/config/system
/etc/config/dhcp
/etc/config/network
/etc/config/wireless
/etc/hotplug.d/iface/30-bitrates

And then upgrade:

cd /tmp
sysupgrade -v openwrt-ar71xx-generic<...>sysupgrade.bin

After the AP reboots, you should SSH into it and see in the banner (or /etc/version) the new firmware version string. You should run:

/etc/init.d/dnsmasq disable
/etc/init.d/firewall disable
reboot

And the AP is now upgraded.

mitar commented 9 years ago

I updated only the Hackerspace AP, but the issue with nodewatcher-agent crashing is not resolved. So I will wait for first that to be resolved before upgrading others.

mitar commented 9 years ago

I opened a ticket here.

mitar commented 9 years ago

Upgrade on UniFi worked without problems as well.

mitar commented 9 years ago

Upgraded firmware images in the repository to April 2015 versions. Proceeding upgrading all APs to it.

mitar commented 9 years ago

All APs upgraded.

mitar commented 9 years ago

The upgrade brought up some issues described in #35. (Or maybe it was just that I broke the script.)