Community discussions

MikroTik App
 
kelvynator
just joined
Topic Author
Posts: 14
Joined: Sat Apr 02, 2016 7:13 am

Update Mikrotik Routerboard

Tue May 11, 2021 5:37 am

Hi,

After several attempts and research on different forums, I come back to you with a problem.
I have a CHR and a hundred Mikrotik devices connected to it.
I can now push updates.
What I want to do is update the Routerboard too.
According to my research, there is no functionality in the CHR.
I would therefore like to create a script which connects in SSH on each Mikrotik router and launches the update command "/ system routerboard upgrade", then a reboot.
I first stumbled on authentication, or it was necessary to enter the password each time. Then I generate a private key to be able to log in automatically without a password.

On the other hand I am still struggling to create a script that would allow me to launch the update of the routerboard. I am having problems with the confirmation of the "y" messages.

Have you ever tried this kind of manipulation?
Do you think this is achievable?

Regards
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Update Mikrotik Routerboard

Tue May 11, 2021 10:28 am

/system routerboard upgrade
"upgrade" only BIOS, not the software.
It's what you want?

Untill you use any type of terminal, confirmation are everytime needed.
For skip that, schedule command like that 1 or 2 min away:
add name=aggiorna_bios on-event="/system routerboard upgrade" \
    policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive \
    start-date=may/11/2021 start-time=09:40:00


For effective update:
{
/system routerboard settings set auto-upgrade=yes
/system package update set channel=long-term
/system scheduler
remove [find where name="pulizia_al_riavvio"]
add name=pulizia_al_riavvio start-time=startup on-event="/delay 20s;\r\n\
    /file remove [find where name~\".fwf\" or name~\".dpk\" or name~\".npk\"];\r\n\
    /system scheduler remove [find where name=\"pulizia_al_riavvio\"];/system reboot;" \
    policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive
/system package update install
}
 
kelvynator
just joined
Topic Author
Posts: 14
Joined: Sat Apr 02, 2016 7:13 am

Re: Update Mikrotik Routerboard

Wed May 12, 2021 12:20 am

Hi,
Thanks for you answer.
Yes I have found the command for active autoupdate in routerboard settings.
After upgrade with Dude, i make a second reboot and the routerboard update automatically.

Thanks for your help.
 
skullzaflare
newbie
Posts: 40
Joined: Tue Apr 12, 2016 12:01 am

Re: Update Mikrotik Routerboard

Wed May 12, 2021 4:49 pm

We just have the routers "scheduled" to check themselves for a routerboard update upon boot always
/system scheduler
add name=firmwarecheck-reboot on-event="#### Check for Firmware Update \r\
    \n\r\
    \n   /system routerboard\r\
    \n   :if ( [get current-firmware] != [get upgrade-firmware]) do={ \r\
    \n      ## New version of firmware available, let's upgrade\r\
    \n     \r\
    \n\r\
    \n      upgrade\r\
    \n\r\
    \n      ## Wait for upgrade, then reboot\r\
    \n      :delay 2s;\r\
    \n      /system reboot\r\
    \n   } else={\r\
    \n   :log info (\"No Router HW upgrade found\")\r\
    \n   }\r\
    \n}" policy=\
    ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon \
    start-time=startup

At this point we have always setup our own redirect from the upgrade.mikrotik.com to a private internal server so the "check for updates" only pulls from our server and auto deploys weekly for if we decide to change firmwares.

So now our routers auto check for routerboard upgrade every reboot and installs if it has one and weekly checks our update server for "latest" package and upgrades if its newer.

Still slowly deploying these changes to our existing 1800 routers, havent found an easy way to send scripts/config changes
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Update Mikrotik Routerboard

Wed May 12, 2021 6:16 pm

Use The Dude, you can upgrade 1000 device at same time, if you want, and no script or fake web update are required.
 
skullzaflare
newbie
Posts: 40
Joined: Tue Apr 12, 2016 12:01 am

Re: Update Mikrotik Routerboard

Wed May 12, 2021 6:37 pm

Use The Dude, you can upgrade 1000 device at same time, if you want, and no script or fake web update are required.
This only does the software side and not routerboard, this is OP's problem.
In my case, DUDE is a PoS on 6.46.3+ firmware if you have rOS enabled on the routers. So its useless for managing routers anymore
 
User avatar
rextended
Forum Guru
Forum Guru
Posts: 11968
Joined: Tue Feb 25, 2014 12:49 pm
Location: Italy
Contact:

Re: Update Mikrotik Routerboard

Wed May 12, 2021 6:58 pm

Sorry, PoS? I do not understand :((

With Dude, you can inject any command to the devices, like "/system routerboard upgrade;/sys reboot"

Who is online

Users browsing this forum: No registered users and 19 guests