Wasn't sure where to best post this, but hopefully someone will find use of it
With the implementation of containers in ROSv7 it opened a whole world of abilities for a Tik, and for anyone that needs to do bulk netinstalls or remotely perform a netinstall in the field (eg. a Tik AP connected to a RB5009) then this might just be useful
Essentially I have bundled the Linux netinstall-cli into a container along with qemu-i386 to allow running the binary on alternate CPUs (eg. ARM/ARM64)
In my testing I was able to do this from a RB4011, and plan to test further with other devices that are capable of running containers (eg. RB5009/NetPower etc)
https://hub.docker.com/r/semaja2/mikrotik-netinstall
Steps
The below steps will create a container linking to ether5, and set netinstall to load the routeros-mipsbe-6.48.6.npk NPK file
- Enable containers and install package (refer wiki)
- Create folder images under disk1
- Upload npk files to images folder
- Create veth interfaceCode:Select all
/interface veth add address=192.168.88.6/24 gateway=192.168.88.1 name=veth1
- Create bridgeCode:Select all
/interface bridge add name=dockers
- Add veth and physical port to bridgeCode:Select all
/interface bridge port add bridge=dockers interface=veth1/interface bridge port add bridge=dockers interface=ether5
- Create mount to contain npk filesCode:Select all
/container mounts add dst=/app/images name=images src=/disk1/images
- Create enviroment set, and specify npk file to useCode:Select all
/container envs add key=NETINSTALL_NPK name=NETINSTALL value=routeros-mipsbe-6.48.6.npk
- Create containerCode:Select all
/container add remote-image=semaja2/mikrotik-netinstall:latest envlist=NETINSTALL interface=veth1 logging=yes mounts=images workdir=/app
[admin@MikroTik] /container> /log/print where topics~"container"
18:42:50 container,info,debug Version: 7.5(2022-08-30 09:34:59)
18:42:50 container,info,debug client: DC:2C:6E:68:XX:XX
18:42:50 container,info,debug sendFile 4877676
18:43:17 container,info,debug Using server IP: 192.168.88.6
18:43:17 container,info,debug Use Netmask: 255.255.255.0
18:43:17 container,info,debug Starting PXE server
18:43:17 container,info,debug Waiting for RouterBOARD...
18:43:17 container,info,debug Discovered RouterBOARD...
18:43:17 container,info,debug Formatting...
18:43:17 container,info,debug Sending package routeros-mipsbe-6.48.6.npk ...
18:43:17 container,info,debug Ready for reboot...
18:43:17 container,info,debug Sent reboot command