Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux

1 comment
Updating UBNT firmware is a simple task, why we need Ubuntu on Windows subsystem for Linux if it has a web interface for doing any configurations and updates?

If you manage a lot of devices and have to deploy configurations or update all the firmware, it will take a long time to do it with web browser. Using Linux bash scripting like expect maybe the solution for that. Just make a script and loop through the devices IP address. I am doing that with a Linux machine.

With Windows Subsystem for Linux, updating UBNT firmware using bash scripting become more simple. You can do many tasks all in one machine Windows 10 and also Ubuntu 20.04 LTS powerful scripting. No need to remote to another machine and do bash scripting to deploy configurations or do a mass firmware update.

How to Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux

This post will only cover how to update a single UBNT AirMax M firmware from Ubuntu 20.04 on Windows Subsystem for Linux. expect script for mass update, maybe on another post (●'◡'●)
Preparing Firmware
You can download latest UBNT firmware from https://www.ui.com/download/ or if you want the beta firmware or custom script firmware, you can join the community at https://community.ui.com/releases.
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
Preparing Firmware
UBNT AirMax M has 2 firmware code, XM and XW. Check your device firmware and make sure you are downloading the right firmware. Take a note for the download location.
Transfer the firmware file to device with Ubuntu 20.04 on WSL
Both Ubuntu Linux and UBNT device can use scp command to transfer files. Let us move to Ubuntu 20.04 WSL to transfer the firmware.
  • Open Command Prompt (cmd) or PowerShell and type 'ubuntu2004' to enter Ubuntu 20.04 on Windows Subsystem for Linux
  • Find the windows drive mount point with 'df' command
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
With 'df' command you can see C: drive is mounted on /mnt/c
  • Change directory to the newly downloaded firmware folder with 'cd' command and list file with 'ls'
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
'cd' and 'ls' command to make sure your firmware location
  • Transfer the file with 'scp firmware-name.bin user@deviceIP:/tmp/fwupdate.bin' then enter your device user's password to start transferring
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
Transfer the file with 'scp' command
Login to your device and start update process
  • Login to your UBNT device with 'ssh user@deviceIP' then enter your device user's password
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
Login to your UBNT device
  • Start update process with '/sbin/fwupdate -m' command and wait until the update finish
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
Start update process with '/sbin/fwupdate -m' command
  • Login back to your device to make sure the device firmware successfully updated
Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux
the device firmware successfully updated

Next task is to create a bash script to mass update devices.But before that, you need to know about bash scripting and I found expect is a good choice for scripting with remote devices either it is telnet or ssh protocol. If you already know expect script, the rest is just regular bash script with while or for condition for looping. Let just end it, for now (⌐■_■)

Like always, you can watch the video about Update UBNT Firmware from Ubuntu 20.04 Windows Subsystem for Linux in step by step from Youtube video below. The video will cover all the process I do when updating my home UBNT Nanostation M2 device. Enjoy...

Related Posts

    1 comment

    Subscribe Our Newsletter