Page 1 of 1

Netinstall broken for hAP AC2 and/or 6.42.6

Posted: Wed Jul 25, 2018 2:23 am
by bigcw
Is anyone else having issues with hAP AC2 and Netinstall and/or 6.42.6 and Netinstall?

I've got the simplest possible .rsc file for testing with:
/interface wireless security-profiles
set [ find default=yes ] supplicant-identity=MikroTik
/ip address
add address=10.0.0.1/30 interface=ether2 network=10.0.0.0
(As a side note: turns out that sometime since the 6.40.2 setting /interface wireless security-profile is now a requirement for a netinstalled router to boot. Thanks for documenting that, Mikrotik! I only wasted about five hours figuring that out by trial and error)

Anyway, process/symptoms as follows:

- Use netinstall to install 6.42.6 with above .rsc as installation script
- Router reboots, ~50 secs later it responds on 10.0.0.1
- Power cycle router, again ~50 seconds later it starts responding again
- Repeat last step several times to be sure
- Factory reset router using the button on the back (held on power up until usr led starts flashing, then let go)
- Router is now a brick. Not even the Mikrotik standard config. Seems to not even boot (but there is no way to tell because no serial port)

Only way to get it back to life is to netinstall again.

For those that have not played with Netinstall, the point of it is that it can set the factory default settings to be custom so when a router goes out to the end user they can factory reset it themselves to get back to a customised known state.

Mikrotik can you comment, please. Is this a known issue? Any roadmap for it to be fixed? If not, how far do I need to roll back in ROS versions to avoid the problem?

Thanks, Chris

Re: Netinstall broken for hAP AC2 and/or 6.42.6

Posted: Wed Jul 25, 2018 7:39 pm
by bigcw
So I got a reply from Mikrotik support. Posting the results here for anyone else who has this struggle in the future.

It appears that scripts are executed prior to the router finishing booting, probably a race condition I guess. As a result, some of the hardware may not be initialised prior to the script being run. Particularly, this can apply to the Ethernet interfaces. I have asked Mikrotik to comment as to whether this is a 'feature' or a 'bug'. It seems more likely to be the latter to me.

Support have suggested adding the following to the top of the script:

while ([:len [/interface find]] != 7) do={}

This will wait for all seven interfaces to be initialised prior to the script running. I guess adding a 'delay 2' to that might also help to resolve this issue.

This has resolved the issue for me. Hopefully it helps someone else in the future.