Netinstall - RouterOS - MikroTik Documentation (2024)

Netinstall is a tool for installing and reinstalling MikroTik devices running RouterOS. Always try using Netinstall if you suspect that your device is not working properly. The tool is available for Windows (with a graphical interface) and for Linux (as a command line tool).

In short, the Netinstall procedure goes like this: Connect your PC directly to the boot port (Usually Ether1, the port labeled BOOT or as otherwise indicated in the product manual) of the device you will be reinstalling. Turn on the device while holding the reset button until it shows up in the Netinstall tool.

Careful. Netinstall re-formats the system's drive, all configuration and saved files will be lost. Netinstall does not erase the RouterOS license key, nor does it reset RouterBOOT related settings, for example, CPU frequency is not changed after reinstalling the device.

  • DownloadNetinstallfrom thedownloadspage.If you are not sure which version you need, then you can always select the version that is marked asCurrent(stable);
  • Download the RouterOSMain packagefrom thedownloadspage;

    You must choose a RouterOS version. You can always select the version that is marked asCurrent. You must also select the architecture (ARM, MIPS, SMIPS, TILE, etc...), but if you are not sure, then you can download the RouterOS package forALLarchitectures, Netinstall will choose the right architecture for you.

  • Disable all of your computer network interfaces (WiFi, Ethernet, LTE, or any other type of connection) besides the one that will be used for installation! Netinstall will only work on one active interface on your computer, it is highly recommended that you disable any other network interfaces to be sure that Netinstall will select the right network interface.

  • Configure a static IP address for your Ethernet interface, openStart,and selectSettings:

Netinstall - RouterOS - MikroTik Documentation (1)

Netinstall can run also on a local network, in such case, you could skip setting a static IP address, but it is highly recommended that you set a static IP address if you are not familiar with Netinstall.

  • OpenNetwork & Internet andselectChange adapter options

Netinstall - RouterOS - MikroTik Documentation (2)Netinstall - RouterOS - MikroTik Documentation (3)

  • Right-clickon your Ethernet interface and selectProperties

Netinstall - RouterOS - MikroTik Documentation (4)

  • SelectInternet Protocol Version 4 (TCP/IPv4)and clickProperties

Netinstall - RouterOS - MikroTik Documentation (5)

  • CheckUse the following IP addressand fill out the fields as shown in the image below

Netinstall - RouterOS - MikroTik Documentation (6)

If you have a working router, then you can use it and skip the setting up a static IP part of this tutorial, but it requires you to know your LAN address since you will need to specify an unused IP address in your network for the network boot server. For this reason, it is recommended to apply a static IP address and follow this guide precisely, if you are not sure how to get these parameters out of your network.

  • Open yourDownloadsfolder (or wherever you saved the downloaded files) and extract the Netinstall.zipfile to a convenient place

Netinstall - RouterOS - MikroTik Documentation (7)Netinstall - RouterOS - MikroTik Documentation (8)

  • Make sure that the Ethernet interface is running and launch Netinstall.exe. If you followed the guide precisely, then you should not have any Internet connection on your computer, Windows 10 wants to verify all apps that it runs, but will not be able to do it due to lack of an Internet connection, for this reason, a warning might pop up, you should clickRun.

Netinstall - RouterOS - MikroTik Documentation (9)

Netinstall requires administrator rights, there should be a window asking for permissions to run Netinstall, you must accept these permissions for Netinstall to work properly.

  • Allow access for Netinstall inPublicnetworks andconfigureNet bootingsettings and fill out the required fields as shown in the image below

Netinstall - RouterOS - MikroTik Documentation (10)Netinstall - RouterOS - MikroTik Documentation (11)

The "Client IP address" must be unique! Don't use an existing IP address in your network, this also means that you should not use the computer's IP address as well. Use a completely different IP address from the same subnet.

  • Connect your device to your computer using an ethernet cable directly (without any other devices in-between), and plug the Ethernet cable into your device's Etherboot port.
  • MikroTik devices can use Netinstall from their first port (Ether1), or from the port marked with "BOOT".


Netinstall - RouterOS - MikroTik Documentation (12)

Some computers have a network interface (especially USB Ethernet adapters) that tend to create an extra link flap, which is enough for Netinstall to fail to detect a device that is in Etherboot mode. In such a case you can use a switch between your device and your computer or a router in bridge mode to prevent this issue.

Netinstall uses bootp packets, which use the same port numbers as DHCP packets. If you're using a switch between your PC and the device to be Netinstalled, ensure that the ports in the bridge are not blocked by other network devices.

If you have dhcp-snooping enabled, make sure to enable "trusted" on the bridge ports facing the Netinstall PC.

  • Power up your device and put it into Etherboot mode

There are multiple ways how to put your device into Etherboot mode. Make sure you read theEtherbootmanual before trying to put the device into this mode. Methods vary between different MikroTik devices.

  • Wait for the device to show up in Netinstall, select it, and pressBrowse.Navigate to yourDownloadsfolder (or wherever you saved your RouterOS packages) and pressOK

Netinstall - RouterOS - MikroTik Documentation (13)Netinstall - RouterOS - MikroTik Documentation (14)

  • Select your desired RouterOS version and pressInstall.Wait for the installation to finish and press "Reboot" (Devices without serial console have to be rebooted manually)

If you downloaded RouterOS packages for multiple architectures, then Netinstall will only show the appropriate architecture packages for your device after you have selected it. All unsupported packages will not show up in this window after you have selected a device.

Netinstall - RouterOS - MikroTik Documentation (15)Netinstall - RouterOS - MikroTik Documentation (16)

If the installation does not start (the progress bar is not moving or no status is shown), then you can try closing the Netinstall application and opening it up again or try to put the device intoEtherbootmode again. If you are still unable to get Netinstall working, then you should try using it on a different computer since there might be an operating system's issue that is preventing Netinstall from working properly.

  • You are done! Remove the device from power, remove the Ethernet cable, place the device back in your network and your device should be running properly now!

After using Netinstall the device will be reset to defaults (unless you specified not to apply default configuration). Some devices are not accessible throughether1port with the default configuration for security reasons. Read more aboutDefault configuration.

Option"Keep branding" allows you to keep the device's already installed branding package without reinstalling it using Netinstall.

The "Keep old configuration" process involves downloading the configuration database from the router, reinstalling the router (including disk formatting), and uploading the configuration files back to it. However, it's important to note that this process solely applies to the configuration itself and does not impact the files, including databases like the User Manager database, Dude database, and others.

When using theConfigure scriptoption, it is suggested to introduceadelaybefore configuration execution.

Configure script pre-configures the device with the provided configuration (text file in .RSC format). This configuration also takes the place of the default configuration. The script can access factory passwords with read-only variables $defconfPassword and $defconfWifiPassword

The Linux version is a command line tool, which offers nearly the same parameters as the Windows counterpart.

Download the tool from our download page (links not literal):

wget https://download.mikrotik.com/routeros/[VERSION]/netinstall-[VERSION].tar.gz

Extract it:

tar -xzf netinstall-[VERSION].tar.gz

Run the tool:

./netinstall-cli -a 192.168.0.1 routeros-arm64-[VERSION].npk

The tool requires privileged access and must be run as root, use sudo.

The available parameters are as follows:

ParameterMeaning
-r

When the reinstallation process is performed, the configuration is reset, and for devices that have it, the default configuration will be applied. (optional)

-e

When the reinstallation process is performed reset the device to empty configuration.

-b

Option to discard the currently installed branding package from the device, otherwise it will be reinstalled together with RouterOS

-k keyfileProvides the device with a license key in .KEY format. (optional)
-s userscriptPre-configures the device with the provided configuration (text file in .RSC format). This configuration also takes the place of the default configuration. The script can access factory passwords with read-only variables $defconfPassword and $defconfWifiPassword (starting from RouterOS 7.10beta8). (optional)

-a IP

Uses a specific IP address that the Netinstall server will assign to the device. Mandatory, but can be auto-assigned if interface parameter is used.

PACKAGESpecify a list of RouterOS.NPK format packages that Netinstall will try to install on the device. (mandatory)
-i

Allows you to specify an interface. (optional)

Note

If the "-r" or "e-" parameter is not specified, netinstall-cli will reinstall RouterOS and will keep the current configuration by downloading the current configuration database from the router, reinstalling the router (including disk formatting), and uploading the configuration back to it, the same as Netinstall "Keep old configuration" option. However, it's important to note that this process solely applies to the configuration itself and does not impact the files, including databases like the User Manager database, Dude database, and others.

First, make sure you have set the IP on your computer's interface:

admin@ubuntu:~$ sudo ifconfig <interface> 192.168.88.2/24

Then run the Netinstall version 6 (an example that resets the configuration upon reinstallation procedure):

admin@ubuntu:~$ sudo ./netinstall -r -a 192.168.88.3 routeros-mipsbe-6.48.1.npkUsing server IP: 192.168.88.2Starting PXE serverWaiting for RouterBOARD...PXE client: 01:23:45:67:89:10Sending image: mipsDiscovered RouterBOARD...Formatting...Sending package routeros-mipsbe-6.48.1.npk ...Ready for reboot...Sent reboot command

Or run the Netinstall version 7 (an example that resets the configuration upon reinstallation procedure):

admin@ubuntu:~$ sudo ./netinstall-cli -r -a 192.168.88.3 routeros-7.5-mipsbe.npkVersion: 7.5 (2022-08-30 09:34:59)Using server IP: 192.168.88.2Use Netmask: 255.255.255.0Starting PXE serverWaiting for RouterBOARD...PXE client: C4:AD:34::89:10Sending image: mipsDiscovered RouterBOARD...Formatting...Sending package routeros-mipsbe-7.5.npk ...Ready for reboot...Sent reboot command

Etherboot mode is a special state for a MikroTik device that allows you to reinstall your device usingNetinstall. There are several ways to put your device into Etherboot mode depending on the device you are using.

Reset button

TheResetcan be found on all MikroTik devices, this button can be used to put the device into Etherboot mode.An easy way to put a device into Etherboot mode using theResetbutton is by powering off the device, holding theResetbutton, powering on the device while holding theResetbutton, and keep holding it until the device shows up in yourNetinstallwindow.

Netinstall - RouterOS - MikroTik Documentation (17)

If you have set upaProtected bootloader, then the reset button's behavior is changed. Make sure you remember the settings you used to set up the Protected bootloader, otherwise, you will not be able to use Eterboot mode and will not be able to reset your device.

RouterOS

If your device can boot up and you can log in, then you can easily put the device into Etherboot mode. To do so, just connect to your device and execute the following command:

/system routerboard settings set boot-device=try-ethernet-once-then-nand

After that either reboot the device or do a power cycle on the device. Next time the device will boot up, then it will first try going into Etherboot mode. Note that after the first boot-up, the device will not try to go into Etherboot mode and will boot directly from NAND or from the storage type the device is using.

Serial console

Some devices come with a serial console that can be used to put the device into Etherboot mode. To do so, make sure you configure your computer's serial console. The required parameters for all MikroTik devices (except for RouterBOARD 230 series) are as follows:

115200bit/s, 8 data bits, 1 stop bit, no parity, flow control=none by default.

For RouterBOARD 230 series devices the parameters are as follows:

9600bit/s, 8 data bits, 1 stop bit, no parity, hardware (RTS/CTS) flow control by default.

Make sure you are using a proper null modem cable, you can find the proper pinouthere. When the device is booting up, keep pressingCTRL+Eon your keyboard until the device shows that it istrying bootp protocol:

RouterBOOT booter 6.42.3CRS125-24G-1SCPU frequency: 600 MHz Memory speed: 175 MHz Memory size: 128 MiB NAND size: 128 MiBPress any key within 2 seconds to enter setupEthernet link absent...trying bootp protocol.....................

At this point your device is in Etherboot mode, now the device should show up in your Netinstall window.

Netinstall - RouterOS - MikroTik Documentation (2024)
Top Articles
Latest Posts
Article information

Author: Ray Christiansen

Last Updated:

Views: 6463

Rating: 4.9 / 5 (69 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ray Christiansen

Birthday: 1998-05-04

Address: Apt. 814 34339 Sauer Islands, Hirtheville, GA 02446-8771

Phone: +337636892828

Job: Lead Hospitality Designer

Hobby: Urban exploration, Tai chi, Lockpicking, Fashion, Gunsmithing, Pottery, Geocaching

Introduction: My name is Ray Christiansen, I am a fair, good, cute, gentle, vast, glamorous, excited person who loves writing and wants to share my knowledge and understanding with you.