Over the past month, our development team has been hard at work delivering a host…
Tips4Tiks – Custom Firmware Updates with Admiral
You just purchased a fresh batch of those sweet ax MikroTiks that come with RouterOS 7 by default. You couldn’t help but notice that there’s a variety of firmware versions on these Tiks, and if you’re like me, you’d like to have them all uniform.
While RouterOS 7 has been striding forward and it’s getting better and better, there is a wrinkle here or there in some of the firmware versions.
If you were to test out a long-term firmware version that you really liked, there’s a chance you wouldn’t be able to use that exact version if a newer version just came out.
MikroTik has a way of getting the exact version of firmware that you want on the routers, however, it requires downloading (or uploading) the files on the router, and doing routerboard upgrades with some reboots in between. It’s not too hard, but if you had even a handful of routers to work on, this turns into a tedious task.
Here’s how to use Fleet Commander to achieve exactly what I described above on a fleet of MikroTiks!
In this example, I will use RouterOS version 7.12 as my “vetted” firmware that I’d like to deploy to all my routers.
Step 1.
Run the following command in your Admiral Fleet Commander:
:global version “7.12”;
:global fwfile “https://download.mikrotik.com/routeros/$version/routeros-$[system resource get architecture-name]-$version.npk”;
/tool fetch $fwfile;
/system script environment remove fwfile,version;
By using [system resource get architecture-name] we’ll get the correct firmware for the CPU architecture that is used on the router (e.g. MIPSBE). Version is set to 7.12, but you’d change that to whichever version you’d like to use.
Once you see in your Fleet Commander log that this job finished executing, you can proceed to Step 2.
Step 2.
In order for the downloaded file to take effect, you’ll have to reboot your routers. You can do this either one by one from your Admiral dashboard, or you can use Fleet Commander to run the job.
The following command will execute a reboot through Fleet Commander without the need to interact with the system
execute script={/system reboot};
Once you see in your Fleet Commander log that this job finished executing, and all of your routers came back online you can proceed to Step 3.
Step 3.
To fully update your router’s firmware you’ll want to do a routerboard upgrade. This requires interaction, just like the reboot in Step 2., so we’ll use the same technique to do this.
Use the following script to do a routerboard upgrade:
execute script={/system routerboard upgrade};
Once you see in your Fleet Commander log that this job finished executing, you can proceed to Step 4.
Step 4.
For the routerboard upgrade to take effect, you’ll have to run the router through another reboot, so we’ll re-do the same instruction as Step 2.:
execute script={/system reboot};
Once you see in your Fleet Commander log that this job finished executing, and all of your routers came back online you can proceed to Step 5.
Step 5.
When you’re done updating your routers, you may want to force the dashboard to check in with the routers and reflect your updates in the dashboard. To do that, click the Rediscover Routers button on the Router List page. Within a few minutes, you should see that the firmware version changed in your dashboard!
If you’d like Admiral to support selecting firmware versions in the future, go to the Feature Request page (button will be in the left-hand side navigation menu), and upvote the feature!! Look around for any other feature requests that you deem useful and upvote them. If you have some ideas on what we could do to make Admiral better, add your own feature request!