meh. After playing around with it, using a docker image to flash would take more effort than it's worth. You would have to mount the update file in the container and set env vars for the flags. It's way more efficient to just run the binary. If they had a web interface for the linux binary or if someone could write one, that would be the game changer though.FANTASTIC!!!
Remote locations, kilometers away.How will you use it? Is there a use case scenario, where you need to reinstall many devices, but have no Linux or Windows computers anywhere?
E-X-A-C-T-L-YI think they wish to run the Linux netinstall binary in a docker container.
Yes, they all are, in our case. It seems to be set to this by default. Some of them we can successfully netinstall remotely, if there is enough bandwidth. Others time out because the connection is too slow. It doesn't happen very often that we have to do this, but would be a handy feature for when this does need to happen.Are they all set by default to nand-if-fail-then-ethernet ?
/partitions set [find] fallback-to=etherboot
# this is RouterOS default
/sys routerboard settings
set boot-device=nand-if-fail-then-ethernet
But still that would not work?Use case for us would be where the user 1000km away reboots their router while it is upgrading RouterOS version, now it can no longer boot except to ethernet. We try to create a layer 2 tunnel to the user to netinstall their router when this happens but due to congestion long distance netinstall does not work properly.
So Mikrotik had a big exploit a few years ago. Only sure way to resolve this issue was to netinstall. If this could be done remotely in a controlled manner, with a remote device, lives would have been much easier. So netinstall is not only used when remote access is lost or device bricked.How do you put them into netinstall, mode, if you have no access?
Are they all set by default to nand-if-fail-then-ethernet ?
I am talking about this from an ISP perspective. At the local site, by where the user is, we have a head-end router there that is fully operational. Many customers routers connect through this head end router. The customers router that connects to our router is trying to boot to ethernet because the user rebooted it while it was upgrading at 4am, when we didn't think any customers would be awake. We try to create a layer 2 tunnel (ex. EoIP) to netinstall the customer router, but due to congestion to the site, it isn't fast enough and the netinstall times out since it is designed for lower latencies. We do not have a linux or windows box at the site that can run netinstall and so we need to have the customer ship us back the router for reprogramming in that case. If we could run a netinstall docker container on our head-end router in that case, the connection would be very fast because it would be local, and the netinstall would probably be successful.I do not fully understand at what level the container-daemons live in ROS, but I'm sure your ROS must be booted up to a certain level for that.
How do you put them into netinstall, mode, if you have no access?
Are they all set by default to nand-if-fail-then-ethernet ?
FROM debian:bullseye-slim
ENV VER=6.48.4
RUN apt-get update && apt-get install -y apt-transport-https curl && \
curl -o /tmp/netinstall.tgz https://download.mikrotik.com/routeros/${VER}/netinstall-${VER}.tar.gz && \
mkdir -p /opt/mikrotik/bin/ && tar zxvf /tmp/netinstall.tgz -C /opt/mikrotik/bin/ && \
rm /tmp/netinstall.tgz
EXPOSE 5000/udp 67/udp 69/udp
CMD /opt/mikrotik/bin/netinstall ${NETINSTALL_OPTS}
Getting netinstall to work in a container is not difficult when using host networking. When using bridge mode - which is the only mode I have seen on the examples for ROS it won't work.
In the past I have set devices to "try-ethernet-once-then-nand" so I would always be able to force them to netinstall in case something fails.How do you put them into netinstall, mode, if you have no access?
Are they all set by default to nand-if-fail-then-ethernet ?
+1+1 for 'try-ethernet-once-then-nand' stay after reboot, be a new default action, not one-time action
I assumed that and spent a LOT of time on it. I could only get a bridged mode of 172.17.0.0/16 to work and not a bridged mode to my local network.
docker run --rm -it --network=host -v `pwd`:/root/ easen/mikrotik-netinstall:7.1rc3 -a 192.168.88.2 /root/routeros-7.1rc3-mmips.npk
Using server IP: 192.168.65.3
Starting PXE server
Waiting for RouterBOARD...
In this case, i think it's better to request a feature that support netinstall within routeros.I am talking about this from an ISP perspective. At the local site, by where the user is, we have a head-end router there that is fully operational. Many customers routers connect through this head end router. The customers router that connects to our router is trying to boot to ethernet because the user rebooted it while it was upgrading at 4am, when we didn't think any customers would be awake. We try to create a layer 2 tunnel (ex. EoIP) to netinstall the customer router, but due to congestion to the site, it isn't fast enough and the netinstall times out since it is designed for lower latencies. We do not have a linux or windows box at the site that can run netinstall and so we need to have the customer ship us back the router for reprogramming in that case. If we could run a netinstall docker container on our head-end router in that case, the connection would be very fast because it would be local, and the netinstall would probably be successful.I do not fully understand at what level the container-daemons live in ROS, but I'm sure your ROS must be booted up to a certain level for that.
ROFL. this binary I tried recently thatWho said Windows netinstall binary? There has been a Linux netinstall version for months now. I think they wish to run the Linux netinstall binary in a docker container.
./netinstall -a 192.168.0.3 routeros-7.1rc3-arm.npk
Using server IP: 192.168.0.135
Starting PXE server
Segmentation fault (core dumped)
I’ll play around with this some more tomorrow. I had started working on a container and thought it was easier to just run the binary, but since there isn’t a MacOS binary this is a great use case for the containerized version.I started to play around with this a few weeks ago, but I didn't get that far. I've recently gave it another go and I've committed what I've got so far to Github and Docker Hub (https://github.com/Easen/mikrotik-netinstall & https://hub.docker.com/r/easen/mikrotik-netinstall).
However I am struggling to get it to work when I'm testing with my hEX on MacOSX. Any pointers?
Has anyone else managed to get this approach to work on MacOSX?Code: Select alldocker run --rm -it --network=host -v `pwd`:/root/ easen/mikrotik-netinstall:7.1rc3 -a 192.168.88.2 /root/routeros-7.1rc3-mmips.npk Using server IP: 192.168.65.3 Starting PXE server Waiting for RouterBOARD...