正文

备份路由固件的命令

查看分区

cat /proc/mtd


dev: size erasesize name
mtd0: 00800000 00010000 "ALL"
mtd1: 00030000 00010000 "Bootloader"
mtd2: 00010000 00010000 "Config"
mtd3: 00010000 00010000 "Factory"
mtd4: 00790000 00010000 "Kernel"
mtd5: 00010000 00010000 "nvbackup"
mtd6: 00010000 00010000 "nvram"

备份分区

cat /dev/mtd0 >/tmp/ALL.bin
cat /dev/mtd1 >/tmp/Bootloader.bin
cat /dev/mtd2 >/tmp/Config.bin
cat /dev/mtd3 >/tmp/Factory.bin
cat /dev/mtd4 >/tmp/Kernel.bin
cat /dev/mtd5 >/tmp/nvbackup.bin
cat /dev/mtd6 >/tmp/nvram.bin

下载备份文件

tftp -p -r ALL.bin -l /tmp/ALL.bin 192.168.2.100
tftp -p -r Bootloader.bin -l /tmp/Bootloader.bin 192.168.2.100
tftp -p -r Config.bin -l /tmp/Config.bin 192.168.2.100
tftp -p -r Factory.bin -l /tmp/Factory.bin 192.168.2.100
tftp -p -r Kernel.bin -l /tmp/Kernel.bin 192.168.2.100
tftp -p -r nvbackup.bin -l /tmp/nvbackup.bin 192.168.2.100
tftp -p -r nvram.bin -l /tmp/nvram.bin 192.168.2.100
# 192.168.2.100 请根据实际改为自己电脑的ip

刷写备份文件

mtd write /tmp/ALL.bin ALL
mtd write /tmp/Bootloader.bin Bootloader
mtd write /tmp/Config.bin Config
mtd write /tmp/Factory.bin Factory
mtd write /tmp/Kernel.bin Kernel
mtd write /tmp/nvbackup.bin nvbackup
mtd write /tmp/nvram.bin nvram

下载刷写breed

tftp -g -l /tmp/breed-mt7620-reset1.bin -r breed-mt7620-reset1.bin 192.168.2.100

mtd write /tmp/breed-mt7620-reset1.bin Bootloader
Last modification:November 26th, 2020 at 09:35 pm
如果觉得我的文章对你有用,请随意赞赏