
Routeros Netinstall
- 1 installs
- 404 repo stars
- Updated August 5, 2026
- aiskillstore/marketplace
routeros-netinstall is a skill for automating RouterOS device flashing with MikroTik's netinstall-cli over BOOTP and TFTP.
About
routeros-netinstall is a skill for MikroTik netinstall-cli, the tool that installs or reinstalls RouterOS over a direct Ethernet connection using BOOTP and TFTP. It documents the command syntax and flags, etherboot entry methods, configure-script versus mode-script behavior, and .npk package handling. A developer uses it when automating netinstall or building device-flashing tooling.
- Automate RouterOS device flashing with netinstall-cli
- Full flag reference plus etherboot entry methods
- Configure-script vs mode-script behavior explained
Routeros Netinstall by the numbers
- 1 all-time installs (skills.sh)
- Ranked #933 of 1,039 Cloud & Infrastructure skills by installs in the Skillselion catalog
- Data as of Aug 5, 2026 (Skillselion catalog sync)
routeros-netinstall capabilities & compatibility
- Capabilities
- device flashing · firmware provisioning
- Use cases
- devops
- Platforms
- Linux
What routeros-netinstall says it does
It uses BOOTP (port 68) and TFTP (port 69) to discover devices in "etherboot" mode and transfer packages to them.
**System package must be listed first** — `routeros-VER-ARCH.npk` must be the first package in the list
npx skills add https://github.com/aiskillstore/marketplace --skill routeros-netinstallAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 1 |
|---|---|
| repo stars | ★ 404 |
| Last updated | August 5, 2026 |
| Repository | aiskillstore/marketplace ↗ |
What it does
Automate flashing and reinstalling RouterOS on hardware devices with netinstall-cli.
Who is it for?
Automating netinstall, writing scripts that invoke netinstall-cli, and building device-flashing tooling
Skip if: In-place software upgrades that do not reformat the device
When should I use this skill?
Automating netinstall, using modescript or configure script, or working with .npk files
What you get
A scripted, repeatable RouterOS reinstall with the correct configure or mode script applied.
- Automated netinstall invocation
- Configure or mode script
By the numbers
- 5 critical netinstall-cli rules
- 2 netinstall variants (Windows GUI and CLI)
Files
RouterOS Netinstall
What Netinstall Is
Netinstall is MikroTik's tool for installing and reinstalling RouterOS on hardware devices over a direct Ethernet connection. It uses BOOTP (port 68) and TFTP (port 69) to discover devices in "etherboot" mode and transfer packages to them.
Two variants:
- Netinstall for Windows — GUI application
- `netinstall-cli` — Linux command-line tool (x86 ELF binary only)
Both re-format the device's system drive. The license key and RouterBOOT settings are preserved.
netinstall-cli Command Syntax
netinstall-cli [-r] [-e] [-b] [-m [-o]] [-f] [-v] [-c]
[-k <keyfile>] [-s <userscript>] [-sm <modescript>]
[--mac <mac>] {-i <interface> | -a <client-ip>} [PACKAGES...]Flags
| Flag | Meaning |
|---|---|
-r | Reinstall with default configuration (mutually exclusive with -e) |
-e | Reinstall with empty configuration (no defaults applied) |
-b | Discard branding package from device |
-m | Enable multiple device reinstallation (loop). Device will be reinstalled each time it sends BOOTP |
-m -o | Multiple reinstall, but each MAC only once per run |
-f | Ignore storage size constraints |
-v | Verbose output |
-c | Allow concurrent netinstall instances on same host |
-k <keyfile> | Install a license key (.KEY file) |
-s <userscript> | Configure script — custom default config that replaces RouterOS-supplied default. Persists across upgrades until re-netinstalled |
-sm <modescript> | Mode script — one-time first-boot script (7.22+). Runs before configure script. Auto-removed after execution. If it changes device-mode, device reboots immediately |
--mac <mac> | Only serve this specific MAC address |
-i <interface> | Listen on this network interface |
-a <client-ip> | Assign this IP to the device (uses BOOTP server auto-detect for interface) |
Critical Rules
1. System package must be listed first — routeros-VER-ARCH.npk must be the first package in the list 2. Requires root/sudo — uses privileged BOOTP (port 68) and TFTP (port 69) 3. Multi-arch support — provide packages for multiple architectures; netinstall auto-detects the device's architecture and selects matching packages 4. x86 binary only — netinstall-cli is an i386 Linux ELF; requires QEMU user-mode emulation on ARM/ARM64 hosts 5. No `-r` and no `-e` = keep old config — downloads config DB from device, reformats, re-uploads config (does NOT preserve files like Dude/UserManager databases)
Interface vs Client-IP Mode
| Mode | Flag | How it works |
|---|---|---|
| Interface | -i <iface> | Listens on the specified interface, auto-detects server IP |
| Client-IP | -a <ip> | Assigns the specified IP to the booting device; netinstall auto-selects the interface |
In containers on RouterOS 7.21+, the VETH interface name matches the configured VETH name (e.g., veth-netinstall), so use -i veth-netinstall.
Etherboot Mode
Devices must be in "etherboot" mode for netinstall to discover them. Methods to enter etherboot:
| Method | How |
|---|---|
| Reset button | Power off, hold reset, power on, hold until device appears in netinstall |
| Serial console | Press Ctrl+E during boot |
| RouterOS CLI | /system/routerboard/settings/set boot-device=try-ethernet-once-then-nand then reboot |
| Protected bootloader | Reset button behavior changes — must remember settings used |
Etherboot uses BOOTP (same ports as DHCP). On networks with DHCP servers, conflicts can occur. Best practice: use a dedicated interface/switch with no other DHCP sources.
Configure Script vs Mode Script
| Feature | Configure Script (-s) | Mode Script (-sm) |
|---|---|---|
| When it runs | After default config is applied (on reboot) | First boot, before configure/default scripts |
| Persistence | Kept across upgrades and resets until re-netinstalled | One-time — auto-deleted after execution |
| Min version | Any RouterOS 7.x | RouterOS and netinstall-cli both >= 7.22 |
| Timeout | 120 seconds | 120 seconds |
| Use case | Custom default config replacement | Device-mode setup, protected-routerboot |
| File format | Regular .rsc with RouterOS CLI commands | Regular .rsc with RouterOS CLI commands |
| Device-mode | If script changes device-mode, reboots immediately | Same |
Configure script variables (7.10beta8+):
$defconfPassword— factory-set admin password (read-only)$defconfWifiPassword— factory-set WiFi password (read-only)
Mode Script for Device-Mode
The primary use case for -sm is enabling device-mode features on first boot without requiring manual power-cycle confirmation:
# Enable advanced mode + container support
/system/device-mode update mode=advanced container=yes
# Enable advanced mode + container + zerotier
/system/device-mode update mode=advanced container=yes zerotier=yesWhen the mode script changes device-mode, the device automatically reboots to apply the change. This replaces what would otherwise require a physical power-cycle/reset-button press.
Package Files (.npk)
URL Pattern
See the routeros-fundamentals skill (version-parsing reference) for download URLs, version channels, and pre-release host selection.
https://download.mikrotik.com/routeros/{version}/routeros-{version}-{arch}.npk
https://download.mikrotik.com/routeros/{version}/all_packages-{arch}-{version}.zip
https://download.mikrotik.com/routeros/{version}/netinstall-{version}.tar.gzx86 exception: x86 packages omit the architecture suffix entirely: routeros-7.22.npk, container-7.22.npk (not routeros-7.22-x86.npk). The all_packages zip does use x86: all_packages-x86-7.22.zip.
Note: Starting sometime around 7.18+, netinstall-cli is distributed as a .tar.gz containing the netinstall-cli binary.
Architecture Names in Packages
| Architecture | Package suffix | Example |
|---|---|---|
| ARM | -arm | routeros-7.22-arm.npk |
| ARM64 | -arm64 | routeros-7.22-arm64.npk |
| MIPS big-endian | -mipsbe | routeros-7.22-mipsbe.npk |
| MIPS multi-core | -mmips | routeros-7.22-mmips.npk |
| MIPS single-core | -smips | routeros-7.22-smips.npk |
| PowerPC | -ppc | routeros-7.22-ppc.npk |
| Tilera | -tile | routeros-7.22-tile.npk |
| x86 | (none) | routeros-7.22.npk |
All-Packages ZIP
The all_packages-{arch}-{version}.zip contains all optional packages for a given architecture. Extract to get individual .npk files. The system package (routeros-*.npk) is also included.
Version Resolution
Current version per channel is available as plain text — see the routeros-fundamentals skill (version-parsing reference) for full details on channels, URL patterns, download host selection (stable vs pre-release), and version comparison logic.
DNS retry pattern: When running in a container at boot time, DNS may not be ready. Retry logic (5 attempts, 2s delay) is recommended for any version resolution at startup:
# GNU make function with retry (from tikoci/netinstall Makefile)
channel_ver = $(firstword $(shell for _i in 1 2 3 4 5; do \
_v=$$(wget -q -O - https://upgrade.mikrotik.com/routeros/NEWESTa7.$(1)) && \
[ -n "$$_v" ] && echo "$$_v" && break; sleep 2; done))Running on Non-x86 Hosts
netinstall-cli is an x86 (i386) Linux ELF binary. On non-x86 hosts:
| Host | Solution |
|---|---|
| x86_64 Linux | Runs natively (kernel supports i386 binaries via IA32_EMULATION) |
| ARM/ARM64 Linux | QEMU user-mode emulation — prefix command with qemu-i386-static or qemu-i386 |
| macOS (any arch) | Requires a full QEMU system VM with bridged networking — user-mode QEMU is Linux-only |
ARM/ARM64 Linux — QEMU User-Mode
Auto-detect the QEMU binary and prefix transparently:
# Auto-detect: prefer local ./i386, fall back to installed static/dynamic variants
QEMU=""
for q in ./i386 qemu-i386-static qemu-i386; do
if [ -x "$q" ] || command -v "$q" >/dev/null 2>&1; then
QEMU="$q"; break
fi
done
# On x86_64 the loop doesn't matter — QEMU stays empty (native)
if [ "$(uname -m)" = "x86_64" ]; then QEMU=""; fi
# Usage — QEMU prefix is a no-op when empty
${QEMU:+$QEMU} ./netinstall-cli -r -b -i eth0 routeros-7.22-arm64.npkPackage notes: Debian/Ubuntu install qemu-user-static → binary is qemu-i386-static (statically linked, safe to copy into containers). Alpine installs qemu-i386 (dynamically linked). The tonistiigi/binfmt OCI image also ships qemu-i386.
`binfmt_misc` alternative: If the kernel has binfmt handlers registered (e.g., via docker run --privileged tonistiigi/binfmt --install all), foreign ELF binaries run transparently without any prefix.
Network Requirements
- Privileged ports: BOOTP uses ports 67/68, TFTP uses port 69 — requires root/sudo
- Direct L2 connection: Device must be on the same Layer 2 segment as the netinstall host
- Static IP recommended: Configure a static IP on the host interface (e.g., 192.168.88.2/24)
- Client IP must be unique: The
-aIP address must not conflict with any other device on the network - Link flaps: Some USB Ethernet adapters cause link flaps that prevent device detection. Use a switch between adapter and device as workaround
- DHCP snooping: If using a managed switch with DHCP snooping, mark the netinstall-facing port as "trusted"
Automation Patterns
Single Device Install
sudo netinstall-cli -r -b -i eth0 \
routeros-7.22-arm64.npk \
container-7.22-arm64.npk \
wifi-qcom-7.22-arm64.npkMulti-Device Install (Service Loop)
# Install every device that boots, each MAC once per run
sudo netinstall-cli -r -b -m -o -i eth0 \
routeros-7.22-arm64.npk \
container-7.22-arm64.npkWith Mode Script (7.22+)
# Write modescript
cat > modescript.rsc << 'EOF'
/system/device-mode update mode=advanced container=yes
EOF
sudo netinstall-cli -r -b -sm modescript.rsc -i eth0 \
routeros-7.22-arm64.npk \
container-7.22-arm64.npkContainerized Netinstall on RouterOS
Run netinstall-cli inside a RouterOS container with VETH networking for "self-provisioning" — the router runs a container that can netinstall other devices on the same LAN.
Key environment variables (passed via /container/envs):
/container envs add key=ARCH list=NETINSTALL value=arm64
/container envs add key=PKGS list=NETINSTALL value="container wifi-qcom"
/container envs add key=CHANNEL list=NETINSTALL value=stable
/container envs add key=OPTS list=NETINSTALL value="-b -r"
/container envs add key=IFACE list=NETINSTALL value=veth-netinstallSee the routeros-container skill for container setup details.
Additional Resources
Related skills:
- For RouterOS CLI/REST basics: see the
routeros-fundamentalsskill - For device-mode configuration: see the
routeros-containerskill (device-mode section)
MCP tools:
- For RouterOS documentation lookups: use the
rosettaMCP server tools (routeros_search,routeros_get_page)
External docs:
- MikroTik official docs: https://help.mikrotik.com/docs/spaces/ROS/pages/24805390/Netinstall
{
"schema_version": "2.0",
"meta": {
"generated_at": "2026-04-16T21:09:52.735Z",
"slug": "tikoci-routeros-netinstall",
"source_url": "https://github.com/tikoci/routeros-skills/tree/main/routeros-netinstall",
"source_ref": "main",
"model": "claude",
"analysis_version": "3.0.0",
"source_type": "community",
"content_hash": "425ead1393cecf05aa291e45f14cdc355c54d792378d8dcfeb97a3849fc151da",
"tree_hash": "ab7b52a183205f83954dca1424d0271b75203cbdb7dd9e9fccc1a844895d033d"
},
"skill": {
"name": "routeros-netinstall",
"description": "MikroTik netinstall-cli for automated RouterOS device flashing. Use when: automating netinstall, writing scripts that invoke netinstall-cli, building netinstall tooling, understanding etherboot/BOOTP/TFTP protocols, working with RouterOS package files (.npk), using modescript or configure script, or when the user mentions netinstall, etherboot, or device flashing.",
"summary": "Reference documentation and automation patterns for MikroTik RouterOS netinstall device flashing.",
"icon": "📦",
"version": "1.1.0",
"author": "tikoci",
"license": "MIT",
"category": "devops",
"tags": [
"mikrotik",
"routeros",
"netinstall",
"device-flashing",
"network-administration"
],
"supported_tools": [
"claude",
"codex",
"claude-code"
],
"risk_factors": []
},
"security_audit": {
"risk_level": "safe",
"is_blocked": false,
"safe_to_publish": true,
"summary": "This skill is a documentation-only SKILL.md file (252 lines) describing MikroTik RouterOS netinstall-cli usage. The static analyzer flagged 124 patterns, but all are false positives from misinterpreting markdown formatting. Backtick-enclosed text (e.g., `netinstall-cli`) is markdown inline code formatting, not Ruby/shell execution. Sudo references, shell command substitution examples, and network URLs appear in documented code examples and reference links. The file contains no executable code, no secrets, and no malicious patterns. Safe for publication.",
"risk_factor_evidence": [],
"critical_findings": [],
"high_findings": [],
"medium_findings": [],
"low_findings": [],
"dangerous_patterns": [],
"files_scanned": 1,
"total_lines": 252,
"audit_model": "claude",
"audited_at": "2026-04-16T21:09:52.735Z",
"risk_factors": []
},
"content": {
"user_title": "Install and manage RouterOS devices with netinstall",
"value_statement": "MikroTik RouterOS device flashing requires understanding BOOTP, TFTP, package management, and scripting. This skill provides complete netinstall-cli reference documentation with automation patterns for single-device and multi-device installations.",
"seo_keywords": [
"MikroTik RouterOS",
"netinstall-cli",
"device flashing",
"etherboot",
"BOOTP TFTP",
"RouterOS packages",
"Claude Code",
"Codex",
"network automation",
"modescript"
],
"actual_capabilities": [
"Explain netinstall-cli flags, syntax, and usage for RouterOS device installation",
"Document etherboot entry methods including reset button, serial console, and CLI approaches",
"Describe configure script versus mode script differences and use cases",
"Guide RouterOS package file (.npk) selection, download URLs, and architecture naming",
"Provide automation patterns for single-device, multi-device, and scripted netinstall workflows",
"Explain cross-platform execution requirements including QEMU emulation on ARM hosts"
],
"limitations": [
"This skill provides documentation only. It does not execute netinstall commands or interact with devices.",
"Actual netinstall operations require physical hardware access, root privileges, and direct Layer 2 connectivity.",
"Package download URLs and version channels reference external MikroTik servers managed outside this skill.",
"Cross-platform emulation (QEMU on ARM, macOS) requires separate system configuration not covered in depth."
],
"use_cases": [
{
"title": "Network administrator deploying RouterOS at scale",
"description": "Use netinstall automation patterns to flash multiple RouterOS devices simultaneously in a lab or production environment. Reference the multi-device install service loop with -m -o flags for efficient batch provisioning.",
"target_user": "Network administrator"
},
{
"title": "DevOps engineer building RouterOS CI/CD pipelines",
"description": "Integrate netinstall-cli into containerized build pipelines for automated RouterOS testing. Reference the containerized netinstall pattern with VETH networking and environment variable configuration.",
"target_user": "DevOps engineer"
},
{
"title": "Technician recovering bricked RouterOS devices",
"description": "Follow etherboot entry procedures and single-device install steps to recover devices that failed firmware updates or have corrupted configurations. Use the configure script pattern for customized defaults.",
"target_user": "IT technician"
}
],
"prompt_templates": [
{
"title": "Basic netinstall command construction",
"prompt": "I need to install RouterOS 7.22 on an ARM64 MikroTik device. Build the netinstall-cli command with reinstall defaults and discard branding package on interface eth0.",
"scenario": "A user needs a basic single-device install command for a standard RouterOS deployment."
},
{
"title": "Modescript for device-mode configuration",
"prompt": "Write a modescript that enables advanced mode with container and zerotier support, then show the netinstall-cli command to apply it on first boot.",
"scenario": "A user wants to configure device-mode features automatically during netinstall without manual power-cycle confirmation."
},
{
"title": "Cross-platform netinstall on ARM host",
"prompt": "I have an ARM64 Linux server and need to run netinstall-cli. Explain the QEMU user-mode setup and show how to auto-detect the correct QEMU binary for transparent execution.",
"scenario": "A user runs netinstall-cli on a non-x86 host and needs emulation configuration guidance."
},
{
"title": "Containerized netinstall service on RouterOS",
"prompt": "Set up netinstall-cli as a RouterOS container that automatically installs RouterOS on devices connecting to the LAN. Configure the container with VETH networking, arm64 architecture, stable channel, and container plus wifi packages.",
"scenario": "A user wants their RouterOS router to serve as a self-provisioning netinstall server for other devices on the network."
}
],
"output_examples": [
{
"input": "Install RouterOS 7.22 with container and WiFi packages on an ARM64 device via eth0.",
"output": [
"Run: sudo netinstall-cli -r -b -i eth0 routeros-7.22-arm64.npk container-7.22-arm64.npk wifi-qcom-7.22-arm64.npk",
"Ensure the device is in etherboot mode (hold reset button while powering on until it appears in netinstall).",
"The system package (routeros-*.npk) must be listed first in the command."
]
},
{
"input": "How do I enter etherboot mode using the RouterOS CLI?",
"output": [
"Run this command in RouterOS CLI: /system/routerboard/settings/set boot-device=try-ethernet-once-then-nand",
"Then reboot the device. It will attempt ethernet boot once before falling back to NAND.",
"After netinstall completes, the boot device setting returns to normal."
]
}
],
"best_practices": [
"Always list the system package (routeros-VER-ARCH.npk) first in the netinstall-cli package list to ensure correct installation order.",
"Use a dedicated network interface or switch with no other DHCP sources to avoid BOOTP conflicts during etherboot device discovery.",
"Apply DNS retry logic (5 attempts with 2-second delays) when running netinstall in containers at boot time, as DNS may not be immediately available."
],
"anti_patterns": [
"Do not combine -r (reinstall with defaults) and -e (reinstall with empty config) flags. They are mutually exclusive and produce undefined behavior.",
"Avoid using USB Ethernet adapters directly between host and device. Link flaps from USB adapters can prevent device detection. Use a switch as an intermediary.",
"Do not run netinstall-cli on networks with active DHCP servers without isolation. BOOTP uses the same ports as DHCP and will cause address conflicts."
],
"faq": [
{
"question": "What is the difference between netinstall and netinstall-cli?",
"answer": "Netinstall is the Windows GUI application. Netinstall-cli is the Linux command-line tool distributed as an x86 ELF binary. Both perform the same RouterOS installation function over Ethernet using BOOTP and TFTP protocols."
},
{
"question": "Why does netinstall-cli require root or sudo privileges?",
"answer": "Netinstall-cli uses BOOTP on port 67/68 and TFTP on port 69. These are privileged ports below 1024 that require root access on Linux systems. The tool also performs low-level network operations for device discovery."
},
{
"question": "Can I run netinstall-cli on a Mac or ARM Linux machine?",
"answer": "On x86_64 Linux, netinstall-cli runs natively. On ARM/ARM64 Linux, use QEMU user-mode emulation with qemu-i386-static or qemu-i386. On macOS, a full QEMU virtual machine with bridged networking is required because QEMU user-mode emulation is Linux-only."
},
{
"question": "What is the difference between a configure script and a mode script?",
"answer": "A configure script (-s flag) runs after default config is applied and persists across upgrades until re-netinstalled. A mode script (-sm flag, RouterOS 7.22+) runs once on first boot before other scripts and is auto-deleted after execution. Mode scripts are ideal for initial device-mode setup."
},
{
"question": "How do I enter etherboot mode on a MikroTik device?",
"answer": "Four methods exist: hold the reset button while powering on until the device appears in netinstall; press Ctrl+E during boot via serial console; set boot-device to try-ethernet-once-then-nand via RouterOS CLI and reboot; or use the protected bootloader method if previously configured."
},
{
"question": "Where do I download RouterOS package files (.npk)?",
"answer": "Download packages from download.mikrotik.com using the pattern: https://download.mikrotik.com/routeros/VERSION/routeros-VERSION-ARCH.npk. You can also extract individual packages from the all_packages-ARCH-VERSION.zip archive for your architecture."
}
]
},
"file_structure": [
{
"name": "SKILL.md",
"type": "file",
"path": "SKILL.md",
"lines": 252
}
]
}
Related skills
FAQ
Which package must be listed first?
The system package routeros-VER-ARCH.npk must be the first package in the list.
What is the difference between -s and -sm scripts?
-s is a persistent configure script; -sm is a one-time first-boot mode script that is auto-removed after execution.