Community discussions

MikroTik App
 
thedigitalwizard
just joined
Topic Author
Posts: 2
Joined: Thu May 23, 2024 5:42 pm

netinstall-cli: cannot install branding

Sat Jun 29, 2024 11:35 pm

Hi,

I'm trying to build automation to be prepared to install 100's of new HAP AX Lite's when they arrive. I've prepared branding with default config, updated password and latest 7.15.2 files.
For this I'd like to use netinstall-cli, as we can have it run on a headless server.

However, netinstall-cli doesn't seem to be able to handle branding .dpk files.
Is there a workaround?

Server setup attempt:
$ sudo ./netinstall-cli -r -i enp0s31f6 routeros-7.15.2-arm.npk container-7.15.2-arm.npk iot-7.15.2-arm.npk wireless-7.15.2-arm.npk branding.npk
Version: 7.15.2(2024-06-26 12:47:18)
Will reset to default config
Using Interface: enp0s31f6
Wait for Link-UP on 'enp0s31f6'. OK
Using Client IP: 10.14.88.68
Using Server IP: 10.14.88.67
Mismatched package architectures

And just the branding:
$ sudo ./netinstall-cli -i enp0s31f6 branding.npk
Version: 7.15.2(2024-06-26 12:47:18)
Using Interface: enp0s31f6
Wait for Link-UP on 'enp0s31f6'. OK
Using Client IP: 10.14.88.68
Using Server IP: 10.14.88.67
Could not determine package architecture

I've downloaded the branding from the Mikrotik website.
Via Windows it does seem to work, but building automation for Windows is horrible :(
 
User avatar
yccit
newbie
Posts: 35
Joined: Tue Jun 25, 2024 8:52 pm
Location: BsAs - Argentina

Re: netinstall-cli: cannot install branding

Sun Jun 30, 2024 3:14 am

In Netinstall you can add ".rsc" in "configure script" but I cannot ensure that it preserves the passwords
 
turnip
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Wed Sep 11, 2013 7:01 pm

Re: netinstall-cli: cannot install branding

Thu Nov 21, 2024 5:21 am

I'm having trouble with the -s option to run a script, but your post gave me the idea to try a branding package, which I'm about to do.
Shouldn't your command line say branding.dpk, not branding.npk?
 
User avatar
abbio90
Member
Member
Posts: 470
Joined: Fri Aug 27, 2021 9:16 pm
Location: Oristano
Contact:

Re: netinstall-cli: cannot install branding

Thu Nov 21, 2024 8:35 am

see also the flashfig tool
 
turnip
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Wed Sep 11, 2013 7:01 pm

Re: netinstall-cli: cannot install branding

Fri Nov 22, 2024 7:09 am

I didn't have any luck installing the branding package with netinstall-cli - no errors, just doesn't work.
Thing is, I'm running it using qemu in a container on my rb5009, so I don't know if it's a me problem or a netinstall-cli problem. Will have to dig up a Linux box to test.
Flashfig isn't suitable for what I'm trying to do - I want to install the latest system, zerotier and container packages and run a custom script which will be retained after a factory reset, and I want to be able to do it as part of an automated workflow using Ansible, so need CLI ways of doing it. I can get in with mac-telnet but automating the process of logging in, ignoring the prompt to reset the password, enable dhcp-client and fetch the package is a bit painful.
 
turnip
Frequent Visitor
Frequent Visitor
Posts: 89
Joined: Wed Sep 11, 2013 7:01 pm

Re: netinstall-cli: cannot install branding

Sat Nov 23, 2024 12:00 pm

Just tried with a normal x86 Linux box and can confirm that netinstall-cli won't install a branding package.

Additionally, the -s option to execute a script doesn't work.
With the script that I want to use (which works when it's part of a branding package uploaded manually), the router (via serial console) tells me to press enter to reboot. I then shutdown netinstall (otherwise it'll run again) and reboot and then the router never boots.
If I use a simpler script, the process completes as normal, but the script doesn't apply.

The simple script I tried to apply is:
/delay delay-time=30s
/system/identity/set name=[/system/routerboard/get serial-number]
 
User avatar
infabo
Forum Guru
Forum Guru
Posts: 1650
Joined: Thu Nov 12, 2020 12:07 pm

Re: netinstall-cli: cannot install branding

Sat Nov 23, 2024 12:57 pm

For automation just use flashfig. Eapeccially when provisioning 100 factory new devices.