This guide describes the following situation:
- Remote MikroTik router has an available RouterOS firmware update
- Automatic firmware update does not work, because there is not enough disk space on the MikroTik router
- Selected packages of the router will be updated remotely
Some more remarks:
- Firmware update can be a tricky process. Make sure you have backup of the configuration and backup device in case of an unexpected failure. Also, if you perform the remote update, make sure you can get to the device, in case the remote access will be interrupted during the update process.
- I have successfully performed the remote firmware update on two Mikrotik hAP lite TC devices from version 6.43.2 to 6.44.
- Most of the information related to the RouterOS firmware update is present in MikroTik Wiki – check it out.
Not Enough Disk Space
Some MikroTik routers have a really small disk space capacity. In my case it is a MikroTik hAP lite TC – Product code RB941-2nD-TC – which has 16MB of flash storage. After some years of happy automatic updates I got to the point when automatic update did not work anymore. Reason is that firmware update file simply won’t fit into the remaining free disk space. It didn’t help to delete all the files. Even that some of the older updates downloaded, there was not enough free disk space to perform the update itself. Later, updates would not even download:
/system package update check-for-updates channel: current installed-version: 6.43.2 latest-version: 6.44 status: New version is available /system package update download channel: current installed-version: 6.43.2 latest-version: 6.44 status: ERROR: not enough disk space, 7.2MiB is required and only 7.2MiB is free
Firmware Update Alternatives
There are some alternatives to automatic process on how to update the MikroTik firmware, but none of those particularly looked promising for my environment and specifically as a replacement for the remotely executed automatic update that I’ve got used to.
One of the alternatives is Netinstall from MikroTik. Netinstall however requires the router to be on the same network where the application is running. Also it needs some extra care to run on Linux – binding of the privileged port is needed and application is primarily designed to be used on Windows systems. Some other methods suggest various ways on how to upload the update file to the router ( via Winbox, WebFig or FTP ). But with the low disk space it won’t help much.
Then I’ve noticed that it is possible to perform a manual update of selected packages only. This does not need to use one large update file, but smaller package files are used instead. This method should be available as manual update directly on the router or as update using the Dude tool. Because I do not use the Dude and I do not have it allowed to connect to the routers for security reasons, I was interested in manual update process.
Manual Update of Selected Packages
At first identify architecture of your device. You can see it in the title of WinBox when you connect to the device:
Or you can look it up in the specification pages of the device on MikroTik site. For hAP lite TC it is SMIPS.
Then download from the MikroTik download page the Extra packages ZIP file. Pay attention to the correct architecture matching your device when selecting the file from the download page.
Then extract the ZIP file, so you will have an individual package files with NPK extension. Now upload the selected packages for firmware update to the router. If only packages that need to be updated will be uploaded, then less disk space is used and even small size of the disk should be sufficient. After the reboot of the device, firmware update packages found on the device will be installed automatically.
On hAP lite TC is an ipv6 package disabled by default, so I’ve skipped that one during the update:
I have noticed that if package file was not there during the update, it has been uninstalled. So make sure that you upload:
- Necessary packages that you need for update ( I believe that it is system, security and routing at least )
- Necessary packages that you need for the router to connect back online and become remotely available again ( might be wireless, ppp, and so on ). Otherwise, your remote update might change to the local one.
After the update, packages will have a new version displayed. Also structure of the packages will change from tree to flat. Packages will be no longer under routeros-smips:
Manual firmware update process of selected packages updated the MikroTik router remotely. Process did not require to fit one complete update file on the router. Instead, firmware update used smaller package files.