netinstall-cli: cannot install branding

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 :frowning:

In Netinstall you can add “.rsc” in “configure script” but I cannot ensure that it preserves the passwords

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?

see also the flashfig tool

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.

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]

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