DEV Community

Cover image for Netinstall MikroTik on Linux
anasrin
anasrin

Posted on • Edited on • Originally published at anasrar.github.io

1

Netinstall MikroTik on Linux

Background

I have RB941-2nD-TC (hAP-Lite2) and it seem I misconfigured, so I need to reset configuration using netinstall technique.

Requirements

  • RouterOS base on your router architecture (in my case is SMIPS).
  • Netinstall (CLI Linux).
  • Plug out router from powerline.

Download all requirements files from https://mikrotik.com/download, and select RouterOS version (in my case is RouterOS v6).

Setup

Files

Extract all files to single folder, so we can work with the files easily.

Disable Internet Interface

Disable all internet interface such as WiFi, and only leaving with Ethernet.

IP Static

Using ip command.

sudo ip addr add 192.168.88.2/24 dev <interface>; sudo ip link set dev <interface> up
Enter fullscreen mode Exit fullscreen mode

Using ifconfig command.

sudo ifconfig <interface> 192.168.88.2/24 up
Enter fullscreen mode Exit fullscreen mode

Where <interface> is your ethernet interface name, you can print list ethernet interface using netstat -i, something like eth* or enp0s* is your interface.

IP Gateway

Using route command.

sudo route add default gw 192.168.88.1 <interface>
Enter fullscreen mode Exit fullscreen mode

Check IP

Using route command to check if we success to setup IP.

route -n
Enter fullscreen mode Exit fullscreen mode

It will print something like this.

Kernel IP routing table
Destination     Gateway         Genmask          Flags  Metric  Ref  Use  Iface
0.0.0.0         192.168.88.1    0.0.0.0          UG     0       0      0  enp0s25
192.168.88.0    0.0.0.0         255.255.255.0    U      0       0      0  enp0s25
Enter fullscreen mode Exit fullscreen mode

Netinstall

Run netinstall with sudo.

sudo ./netinstall -r -a 192.168.88.1 <routeros>
Enter fullscreen mode Exit fullscreen mode
  • Plug ethernet cable from PC to router.
  • Press reset button on router.
  • Plug router to powerline.

Result

My netinstall result.

Netinstall Mikrotik on Linux

Known Issues

  • ### Only Show PXE client

Disable all interface except ethernet.

  • ### FAILED TO REPLY

Make sure you set IP gateway.

  • ### Using server IP: 0.0.0.0

Make sure you plug out router from powerline before you run netinstall.

References

Image of Timescale

🚀 pgai Vectorizer: SQLAlchemy and LiteLLM Make Vector Search Simple

We built pgai Vectorizer to simplify embedding management for AI applications—without needing a separate database or complex infrastructure. Since launch, developers have created over 3,000 vectorizers on Timescale Cloud, with many more self-hosted.

Read more

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

AWS GenAI Live!

GenAI LIVE! is a dynamic live-streamed show exploring how AWS and our partners are helping organizations unlock real value with generative AI.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️