找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 10224|回复: 8

OPENWRT备份当前固件

[复制链接]
发表于 2013-6-25 15:16 | 显示全部楼层 |阅读模式
本帖最后由 bsctv 于 2013-6-25 15:22 编辑

841nv7 4m固件为例:
WinSCP登陆进去,

root@OpenWrt:~# dmesg   命令,看看这一段:

0.720000] 0x000000000000-0x000000020000 : "u-boot"
[    0.730000] 0x000000020000-0x000000101e00 : "kernel"
[    0.730000] mtd: partition "kernel" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.740000] 0x000000101e00-0x0000003f0000 : "rootfs"
[    0.750000] mtd: partition "rootfs" must either start or end on erase block boundary or be smaller than an erase block -- forcing read-only
[    0.760000] mtd: partition "rootfs" set to be root filesystem
[    0.770000] mtd: partition "rootfs_data" created automatically, ofs=390000, len=60000
[    0.780000] 0x000000390000-0x0000003f0000 : "rootfs_data"
[    0.790000] 0x0000003f0000-0x000000400000 : "art"
[    0.790000] 0x000000020000-0x0000003f0000 : "firmware"
[    0.800000] 0x000000000000-0x000000400000 : "fullflash"
可以看出固件的各构成部分,在闪存中的位置及大小。

再命令
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "u-boot"
mtd1: 000e1e00 00010000 "kernel"
mtd2: 002ee200 00010000 "rootfs"
mtd3: 00060000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "art"
mtd5: 003d0000 00010000 "firmware"
mtd6: 00400000 00010000 "fullflash"


这个mtd6: 00400000 00010000 "fullflash"是编程器固件。

备份"fullflash"(mtd6)到/tmp文件夹。
root@OpenWrt:~# cat /dev/mtd6 >/tmp/fullflash.bin


最后用WinSCP复制到电脑。获得编程器固件,不过它包括了你的所有配置。
更改cat /dev/mtd6 >/tmp/fullflash.bin命令可以备份mtd0-6任一部份。
我的恩山、我的无线 The best wifi forum is right here.
发表于 2013-6-25 15:20 | 显示全部楼层
真的这么简单吗!!??
回家好好试验一下
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-6-25 16:19 | 显示全部楼层
谢谢,回家试试看,这样不用编程器了
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-6-25 17:37 | 显示全部楼层
fullflash分区不是本来就有的,你的这个固件应该是别人或者你自己添加编译的,所以不是每个人都适用,另外备份有专用命令dd
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2013-6-25 23:29 | 显示全部楼层
如果没有fullflash分区,把前边的mtd0-5都搞出来,按原顺序组合起来也是编程器固件,注意顺序别错了。
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2013-11-17 21:39 | 显示全部楼层
bsctv 发表于 2013-6-25 23:29
如果没有fullflash分区,把前边的mtd0-5都搞出来,按原顺序组合起来也是编程器固件,注意顺序别错了。

请问怎么组合起来呢。?一个一个的刷嘛?我想要那种。直接按复位。复位回来是我备份的状态,
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2014-3-29 21:34 | 显示全部楼层
/$  cat /proc/mtd
dev:    size   erasesize  name
请问只有下面5份   刷那个呀
mtd0: 00010000 00010000 "CFE"
mtd1: 0010ff00 00010000 "kernel"
mtd2: 00ed0000 00010000 "rootfs"
mtd3: 00d50000 00010000 "rootfs_data"
mtd4: 00010000 00010000 "nvram"
mtd5: 00fe0000 00010000 "linux"
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2017-7-16 16:33 | 显示全部楼层
备份之后,怎么恢复呢?
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2022-10-12 15:38 | 显示全部楼层
大神怎么还原回去
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-3-29 18:23

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表