密码:官网给出密码
在命令下输入cat /proc/mtd得到分区情况(如下):
root@XiaoQiang:~# cat /proc/mtd
dev: size erasesize name
mtd0: 07f80000 00020000 "ALL"
mtd1: 00080000 00020000 "Bootloader"
mtd2: 00040000 00020000 "Config"
mtd3: 00040000 00020000 "Bdata"
mtd4: 00040000 00020000 "Factory"
mtd5: 00040000 00020000 "crash"
mtd6: 00040000 00020000 "crash_syslog"
mtd7: 00040000 00020000 "reserved0"
mtd8: 00400000 00020000 "kernel0"
mtd9: 00400000 00020000 "kernel1"
mtd10: 02000000 00020000 "rootfs0"
mtd11: 02000000 00020000 "rootfs1"
mtd12: 03580000 00020000 "overlay"
mtd13: 012a6000 0001f000 "ubi_rootfs" (不存在的话忽略!)
mtd14: 030ec000 0001f000 "data" (不存在的话忽略!)
首先先备份,把U盘(FAT/FAT32格式)插入到路由,
然后用命令输入【df -h】查看查看U盘的分区路径
或者输入"cd /"回车,再输入"ls -a"查看到extdisks文件,
再"cd extdisks"进入到extdisks文件里用"ls -a"就能查看到你的U盘路径,
我的是sda4,以下以我自己U盘的路径为例:
备份(请自行修改回你自己的U盘路径):
dd if=/dev/mtd0 of=/extdisks/sda4/ALL.bin
dd if=/dev/mtd1 of=/extdisks/sda4/Bootloader.bin
dd if=/dev/mtd2 of=/extdisks/sda4/Config.bin
dd if=/dev/mtd3 of=/extdisks/sda4/Bdata.bin
dd if=/dev/mtd4 of=/extdisks/sda4/Factory.bin
dd if=/dev/mtd5 of=/extdisks/sda4/crash.bin
dd if=/dev/mtd6 of=/extdisks/sda4/crash_syslog.bin
dd if=/dev/mtd7 of=/extdisks/sda4/reserved0.bin
dd if=/dev/mtd8 of=/extdisks/sda4/kernel0.bin
dd if=/dev/mtd9 of=/extdisks/sda4/kernel1.bin
dd if=/dev/mtd10 of=/extdisks/sda4/rootfs0.bin
dd if=/dev/mtd11 of=/extdisks/sda4/rootfs1.bin
dd if=/dev/mtd12 of=/extdisks/sda4/overlay.bin
dd if=/dev/mtd13 of=/extdisks/sda4/ubi_rootfs.bin (不存在的话忽略!)
dd if=/dev/mtd14 of=/extdisks/sda4/data.bin (不存在的话忽略!)
备份到最后一个mtd14可以会出现如下出错提示:
dd: can't open '/dev/mtd14': Device or resource busy
该分区备份不成功无所谓,关键的mtd0-mtd4备份下来就行了。
如果还在官版的固件下想恢复的,可使用如下命令:
恢复(这里我们不需要该步骤,只是给有需要的人看的官版固件下的恢复步骤)
mtd write /extdisks/sda4/Bootloader.bin Bootloader
mtd write /extdisks/sda4/Config.bin Config
mtd write /extdisks/sda4/Bdata.bin Bdata
mtd write /extdisks/sda4/Factory.bin Factory
mtd write /extdisks/sda4/crash.bin crash
mtd write /extdisks/sda4/crash_syslog.bin crash_syslog
mtd write /extdisks/sda4/reserved0.bin reserved0
mtd write /extdisks/sda4/kernel0.bin kernel0
mtd write /extdisks/sda4/kernel1.bin kernel1
mtd write /extdisks/sda4/rootfs0.bin rootfs0
mtd write /extdisks/sda4/rootfs1.bin rootfs1
mtd write /extdisks/sda4/overlay.bin overlay
mtd write /extdisks/sda4/ubi_rootfs.bin ubi_rootfs (不存在的话忽略!)
mtd write /extdisks/sda4/data.bin data (不存在的话忽略!)