RouterBOOT

RouterBOOT 负责在 MikroTik 硬件设备上启动 RouterOS,具有主加载器和备份加载器,并提供 force-backup-booter 选项。reset 按钮具有多种功能,包括重置配置、启用 CAPs 模式以及搜索 Netinstall 服务器。带串口控制台的 RouterBOARD 设备可按特定设置访问。

RouterBOOT

RouterBOOT 负责在 MikroTik 硬件设备(如接入点、路由器及其他型号)上启动 RouterOS。由于 MikroTik 推出了许多新的硬件系列,本文及其他处出现的 RouterBOARD 一词同样适用于所有其他运行 RouterOS 的硬件系列。

主加载器与备份加载器

默认使用主(常规)加载器,但 RouterBOARD 设备还有第二(备份)引导加载器,可在主加载器失效时使用。可以通过 RouterOS 中的配置设置来调用备份加载器:

/system/routerboard/settings/set force-backup-booter=yes

也可以在按住 RESET 按钮的同时给设备通电,从而使用备份 booter。只有主 RouterBOOT 可以升级,因此一旦失败,你可以用备份 booter 启动设备并降级主加载器。升级说明请参阅 RouterBOARD#UpgradingRouterBOOT 中的单独说明。

RouterBOARD reset 按钮

RouterBOOT 的 reset 按钮有三个功能:

  • 在启动期间按住该按钮,直到 LED 开始闪烁时松开,即可重置 RouterOS 配置(共 5 秒)。
  • 继续按住 5 秒,直到 LED 变为常亮,此时松开即可开启 CAPs 模式(共 10 秒)。
  • 或者继续按住 5 秒,直到 LED 熄灭,此时松开即可让 RouterBOARD 查找 Netinstall 服务器。

警告

如果你在通电之前就按住按钮,除了上述所有动作外,还会使用备份 RouterBOOT。若要在不加载备份加载器的情况下执行上述动作,请在设备通电后立即按下按钮。 重置密码

https://www.youtube.com/watch?v=6Unz92rABs8

Wireless Wire 套件的配置重置

reset 按钮的功能与其他设备相同,详细说明见 /docs/Getting%20Started/routeros-configuration-reset

启动时按住按钮 5 秒(USR LED 开始闪烁)——重置为受密码保护的状态。

启动时按住按钮 10 秒(USR LED 闪烁后变为常亮)——完全清除配置。

配置

对于带串口控制台接口的 RouterBOARD 设备,可以访问 RouterBOOT 加载器配置菜单。所需线缆说明请参阅串口控制台手册。RouterBOARD 串口配置为 115200bit/s、8 数据位、1 停止位、无校验。建议禁用硬件流控。

下面示例展示了 RouterBOOT 7.4beta4 中提供的菜单:

RouterBOOT booter 7.4beta4

CRS328-24P-4S+

built by build at 2022-06-15 11:34:09 from revision 73B4521C

CPU frequency: 800 MHz
  Memory size: 512 MiB
 Storage size:  16 MiB

Press Ctrl+E to enter etherboot mode
Press any key within 2 seconds to enter setup

RouterBOOT-7.4beta4
What do you want to configure?
   d - boot delay
   k - boot key
   s - serial console
   n - silent boot
   o - boot device
   z - extra kernel parameters
   r - reset booter configuration
   e - format storage
   w - repartition nand
   g - upgrade firmware
   i - board info
   p - boot protocol
   b - booter options
   j - boot os
   t - hardware tests
   l - erase license
   x - exit setup
your choice: 

各选项的用途一目了然。

字母说明解释
dboot delay延迟 RouterOS 的启动,以便某个接口完成初始化
kboot key用于打开配置菜单的按键
sserial console设置串口的波特率
nsilent boot抑制串口上的所有输出,适用于串口连接了某些设备的情况(如 GPS 设备或温度监控器)
oboot device允许启用 Netinstall 启动
zextra kernel parameters
rreset booter configuration重置此菜单中的设置。警告,没有确认提示!
eformat storage销毁 NAND 上的所有数据,包括 RouterOS 配置和授权
wrepartition nand更多信息请参阅分区文档
yactive partition选择尝试加载 RouterOS 的活动分区
gupgrade firmware允许通过网络或 XModem 协议升级 RouterBOOT 版本
iboard info
pboot protocol
bbooter options选择默认使用的引导加载器
tdo memory testing
jboot os
lerase license
xexit setup

按下相应的键盘字母会给出更多选项列表,如下所示:

# d - boot delay:

Select boot delay:
   1 - 1s
 * 2 - 2s
   3 - 3s
   4 - 4s
   5 - 5s
   6 - 6s
   7 - 7s
   8 - 8s
   9 - 9s

# k - boot key:

Select key which will enter setup on boot:
 * 1 - any key
   2 - <Delete> key only

# s - serial console:

Select baud rate for serial console:
 * 1 - 115200
   2 - 57600
   3 - 38400
   4 - 19200
   5 - 9600
   6 - 4800
   7 - 2400
   8 - 1200
   9 - off

# n - silent boot:

Silent boot:
   0 - off
 * 1 - on

# o - boot device:

Select boot device:
   e - boot over Ethernet
 * n - boot from NAND, if fail then Ethernet
   1 - boot Ethernet once, then NAND
   o - boot from NAND only
   b - boot chosen device
   f - boot Flash Configure Mode
   3 - boot Flash Configure Mode once, then NAND

# f - cpu frequency:

Select CPU frequency:
   a -  200MHz
   b -  400MHz
   c -  600MHz
   d -  800MHz
   e - 1000MHz
 * f - 1200MHz

# r - reset booter configuration:

# e - format nand:

Do you really want to format your storage device?
that would result in losing all your data
type "yes" to confirm: 

# w - repartition nand:

Select partition count:
   1 - partition
 * 2 - partitions
   3 - partitions
   4 - partitions

# y - active partition:

Select active partition:
 * 0 - partition
   1 - partition

# g - upgrade firmware:

Upgrade firmware options:
   e - upgrade firmware over ethernet
   s - upgrade firmware over serial port

# i - board info:

Board Info:

        Board type: CCR1009-8G-1S-1S+
     Serial number: 48FF01DDE6FD
  Firmware version: 3.19
     CPU frequency: 1200 MHz
       Memory size: 2048 MiB
         NAND size: 128 MiB
        Build time: 2014-09-23 15:02:34
  eth1 MAC address: 00:0C:42:00:BE:4A
  eth2 MAC address: 00:0C:42:00:BE:4B
  eth3 MAC address: 00:0C:42:00:BE:4C
  eth4 MAC address: 00:0C:42:00:BE:4D
  eth5 MAC address: 00:0C:42:00:BE:4E
  eth6 MAC address: 00:0C:42:00:BE:4F
  eth7 MAC address: 00:0C:42:00:BE:50
  eth8 MAC address: 00:0C:42:00:BE:51
  eth9 MAC address: 00:0C:42:00:BE:52
 eth10 MAC address: 00:0C:42:00:BE:53

# p - boot protocol:

Choose which boot protocol to use:
 * 1 - bootp protocol
   2 - dhcp protocol

# b - booter options:

Select which booter you want to load:
 * 1 - load regular booter
   2 - force backup-booter loading

#t - do memory testing:

launches built in memory test!

# x - exit setup:

Exit bios configuration menu and continues with system startup.

简易升级

可以通过 RouterOS 升级 RouterBOOT:

  • 运行命令 /system/routerboard/upgrade。
  • 重启路由器以应用升级(/system/reboot)。
[admin@admin] > /system/routerboard/upgrade 
Do you really want to upgrade firmware? [y/n] 

警告

每个 ROS 版本都包含一个新的 RouterBoot 版本。执行 ROS 升级后,我们始终建议同时升级 RouterBoot。

查看 RouterBOOT 版本

以下命令显示设备当前的 RouterBOOT 版本,以及 routeros-x.yy.npk 包中包含的可用升级,或你上传的与该设备型号对应的 *.FWF 文件:

[admin@admin] >  /system/routerboard/print 
                ;;; Firmware upgraded successfully, please reboot for changes 
                    to take effect!
       routerboard: yes
        board-name: hAP ac
             model: RouterBOARD 962UiGS-5HacT2HnT
     serial-number: 6737057562DD
     firmware-type: qca9550L
  factory-firmware: 3.29
  current-firmware: 6.49.5
  upgrade-firmware: 7.4beta5 

在本例中可以看到,当前 RouterOS 版本中已经包含一个更新版的引导加载器固件,它已被更新并需要重启。

警告

也可以上传较旧版本的 *.FWF 文件进行降级,这在联系 MikroTik 支持进行故障排查时可能是必要的。