Flash 刷机
Flash 刷机
需求
防火墙无法正常启动时,可以考虑格式化 Flash 闪存盘,传入新的固件,防火墙会使用新的固件与配置文件启动。
重要
通过此方式将固件刷入 Flash 卡后,原有固件与配置文件会被清空。
刷机前,务必做好配置备份,参考 系统管理 → 固件与配置管理 → 配置管理 → 配置备份及恢复。
如果 FortiGate 设备运行的 BIOS 版本为 5000100 或 6000100(或更新版本),用户将无法降级到 6.0、6.2 或 6.4.13、7.0.12、7.2.5、7.4.0 以下的 FortiOS 版本,如果需要降级到这些版本,请参考 这里修改 BIOS 安全级别。
拓扑图

配置要点
- 准备好工具,连接好 Console 线。
- 连接网线,保证通讯正常。
- 搭建好 TFTP 服务器。
- 开始升级。
配置步骤
准备好工具,准备好 Console 线,网线,升级文件,TFTP 工具,若 PC 没有 com 口,需要购买转 USB 的线缆,并且装好驱动。
连接网线,保证通讯正常。
搭建好 TFTP 服务器,可下载如下附件里的 TFTP 服务器软件(也可使用其他 TFTP Server 软件)。
启动 TFTP 服务器软件(确保 TFTP 服务器处于开启状态),修改 TFTP 服务器的文件路径到固件包所在路径,如下所示。
Windows(如下图路径为
D:\Downloads\ver\):
macOS(如下图路径为
~/Downloads/ver):
开始升级,重新启动设备。
重启开始时将出现 "Press any key to display configuration menu...",此时按任意键进入 BIOS 菜单(有些型号的 BIOS 可能需要敲入 Ctrl + B 进入,请根据提示信息操作)。
Please wait for OS to boot, or press any key to display configuration menu.... [C]: Configure TFTP parameters. [R]: Review TFTP parameters. [T]: Initiate TFTP firmware transfer. [F]: Format boot device. [I]: System information. [B]: Boot with backup firmware and set as default. [Q]: Quit menu and continue to boot. [H]: Display this list of options.键入
F,格式化 Flash 卡,提示是否确认格式化,键入yes后回车。重要
键入 F,将 flash 卡格式化,原有配置文件及 OS 将会被删除掉。
Enter C,R,T,F,I,B,Q,or H:f It will erase data in boot device. Continue? [yes/no]:yes Formatting.......... Done.格式化完毕后,键入
C,配置 TFTP 服务器,看到菜单如下。[P]: Set firmware download port. [D]: Set DHCP mode. [I]: Set local IP address. [S]: Set local subnet mask. [G]: Set local gateway. [V]: Set local VLAN ID. [T]: Set remote TFTP server IP address. [F]: Set firmware file name. [E]: Reset TFTP parameters to factory defaults. [R]: Review TFTP parameters. [N]: Diagnose networking(ping). [Q]: Quit this menu. [H]: Display this list of options.键入
P可以选择 FortiGate 上传固件使用的接口,这里我们使用 WAN1 接口为例,键入 WAN1 的序号 8,然后键入回车键。
键入
I,输入防火墙本地 IP(中括号 [] 内的 IP 为上次进入 BIOS 配置的本地 IP),然后键入回车键。
Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:i
Enter local IP address [192.168.91.180]: 192.168.90.176
.done键入
S,输入防火墙本地 IP 的掩码(中括号 [] 内的掩码为上次进入 BIOS 配置的本地 IP 掩码),然后键入回车键。Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:s Enter local subnet mask [255.255.255.0]: 255.255.255.0 .done如果 FortiGate 与 TFTP 服务器不在同一网段,键入
G,输入 FortiGate 的默认网关,否则跳过此步(中括号 [] 内的网关为上次进入 BIOS 配置的网关),然后键入回车键。Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:g Enter local gateway IP address [192.168.91.254]: 192.168.90.254 .done键入
T,输入 TFTP 服务器的 IP 地址(中括号 [] 内的 IP 为上次进入 BIOS 配置的 TFTP 服务器 IP),然后键入回车键。Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:t Enter remote TFTP server IP address [192.168.118.26]: 192.168.90.178 .done键入
F,输入传输的版本镜像名称(中括号[]内的文件名称为上次进入 BIOS 配置的镜像文件名称),然后键入回车键。Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:f Enter firmware file name [FGT_61F-v6-build0866-FORTINET.out]: FGT_61F-v7.2.8.M-build1639-FORTINET.out .done键入
R,检查 TFTP 配置是否正确,检查无误后,键入Q返回上一级菜单。Enter P,D,I,S,G,V,T,F,E,R,N,Q,or H:r Image download port: WAN1 DHCP status: Disabled Local VLAN ID: <NULL> Local IP address: 192.168.90.176 Local subnet mask: 255.255.255.0 Local gateway: 192.168.90.254 TFTP server IP address: 192.168.90.178 Firmware file name: FGT_61F-v7.2.8.M-build1639-FORTINET.out键入
T,开始从 TFTP 服务器传输版本镜像文件,传输完成后,键入D将该镜像设置为默认启动的主系统版本(也可键入B设置为备份系统的镜像)。Enter C,R,T,F,I,B,Q,or H:t Please connect TFTP server to Ethernet port 'WAN1'. MAC: 90:6c:ac:f9:18:e8 Connect to tftp server 192.168.90.178 ... ################################################################################################################################################ Image Received. Checking image... OK Uncompressed size: 268435968 = 0x10000200 Save as Default firmware/Backup firmware/Run image without saving:[D/B/R]?D同时 TFTP 服务器也会提示下载成功。
Windows:

macOS:

随后 FortiGate 可能会提示重新部署启动分区,键入
Y(如果没有出现此提示,请忽略此步)。设备将重新格式化启动分区并使用以上步骤刷入的镜像版本启动。Programming the boot device now. The system must re-layout the boot device to install this firmware. The default and backup firmware will be lost. Continue:[Y/N]?y .. Booting OS... Reading boot image... 2967212 bytes. Initializing firewall... System is starting... Resizing shared data partition...done Formatting shared data partition ... done! Starting system maintenance... Scanning /dev/mmcblk0p1... (100%) Scanning /dev/mmcblk0p3... (100%) FortiGate-101E login:设备已加载 TFTP 导入的镜像作为主版本启动。
FortiGate-61F # get sys status | grep Version Version: FortiGate-61F v7.2.8,build1639,240313 (GA.M) Release Version Information: GA