routeros-netinstall
使用 netinstall 安装和管理 RouterOS 设备
MikroTik RouterOS 设备刷机需要理解 BOOTP、TFTP、包管理和脚本编写。本技能提供完整的 netinstall-cli 参考文档,包含用于单设备和多设备安装的自动化模式。
下载技能 ZIP
在 Claude 中上传
前往 设置 → 功能 → 技能 → 上传技能
开启并开始使用
测试它
正在使用“routeros-netinstall”。 Install RouterOS 7.22 with container and WiFi packages on an ARM64 device via eth0.
预期结果:
- 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.
正在使用“routeros-netinstall”。 How do I enter etherboot mode using the RouterOS CLI?
预期结果:
- 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.
安全审计
安全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.
质量评分
你能构建什么
在实验室或生产环境中大规模部署 RouterOS 的网络管理员
使用 netinstall 自动化模式同时刷写多个 RouterOS 设备。参考带 -m -o 参数的多设备安装服务循环以实现高效的批量配置。
构建 RouterOS CI/CD 管道的 DevOps 工程师
将 netinstall-cli 集成到容器化构建管道中以实现自动化的 RouterOS 测试。参考带有 VETH 网络和环境变量配置的容器化 netinstall 模式。
恢复变砖 RouterOS 设备的技术人员
按照 etherboot 启动程序和单设备安装步骤恢复固件更新失败或配置损坏的设备。使用 configure 脚本模式获取自定义默认值。
试试这些提示
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.
Write a modescript that enables advanced mode with container and zerotier support, then show the netinstall-cli command to apply it on first boot.
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.
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.
最佳实践
- 始终将系统包(routeros-VER-ARCH.npk)放在 netinstall-cli 包列表的第一位,以确保正确的安装顺序。
- 使用专用网络接口或交换机,且没有其他 DHCP 源,以避免 etherboot 设备发现期间的 BOOTP 冲突。
- 在容器启动时运行 netinstall 时应用 DNS 重试逻辑(5 次尝试,间隔 2 秒),因为 DNS 可能无法立即可用。
避免
- 不要组合使用 -r(带默认配置重装)和 -e(带空配置重装)参数。它们互斥,会产生未定义行为。
- 避免在主机和设备之间直接使用 USB 以太网适配器。USB 适配器的链路抖动可能导致设备检测失败。使用交换机作为中间设备。
- 不要在没有隔离的网络上运行 netinstall-cli。BOOTP 使用与 DHCP 相同的端口,会导致地址冲突。