OpenWrt Forum Archive

Topic: Backup / Restore - Create Bin file from existing Router

The content of this topic has been archived on 23 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,

Is it possible to create a Backup/Image/Bin from a working router, and then upload the
bin file to others routers.

If it was possible to create a bin file for uploading, one could deploy wrt to multiple routers.

Could dd(http://en.wikipedia.org/wiki/Dd_(Unix)) possibly work?


Thanks/

I found this here(https://forum.openwrt.org/viewtopic.php?pid=78906):

mount -o remount,ro /dev/mtdblock/4 /jffs
dd if=/dev/mtdblock0 > /tmp/NSLU2C_image.bin
dd if=/dev/mtdblock1 >> /tmp/NSLU2C_image.bin
dd if=/dev/mtdblock2 >> /tmp/NSLU2C_image.bin
dd if=/dev/mtdblock3 >> /tmp/NSLU2C_image.bin
dd if=/dev/mtdblock4 >> /tmp/NSLU2C_image.bin
dd if=/dev/mtdblock6 >> /tmp/NSLU2C_image.bin
mount -o remount,rw /dev/mtdblock/4 /jffs

Wondering will I have a brick after this when I upload the file to a new Router.

Yes, I guess.

Install OpenWrt from factory.
Save mtd "firmware".
Install OpenWrt on another router.
Override mtd "firmware" with the file saved.

Maybe I was not that clear, actually I want to configure "One Router" with OpenWrt,
and then upload the bin file to Routers that do not have OpenWrt on them yet.

I can only access the routers once, since they are remote. If the procedure should fail I will have to drive out to them (14 of them) and go and configure them - painful. 

(1) So my idea is to create a "perfect" install for the router, (2) create an image with dd, (3) and upload the file remotely using the non OpenWrt Firmware.

Unless you can produce a backup image that you can flash through the original webinterface, there's no point in doing it this way as far as I can tell. You can just as easily flash all the routers with the same image, then restore a /overlay tar backup manually.

@Wayneforrest

You might want to look at building your own image, that way you can control every last detail if you wish.

(Last edited by arokh on 13 Apr 2011, 14:32)

arokh wrote:

You might want to look at building your own image, that way you can control every last detail if you wish.

That is the way I do.

I am now trying to *BUILD* my own bin file, when I run the command
make profile=xyz , I am unable to find the profile for my router.

I am using the following file to Build.
http://downloads.openwrt.org/backfire/1 … 86.tar.bz2

(Folowing these instructions http://wiki.openwrt.org/doc/howto/obtai … .generate)


But the version for my router was found here:
http://downloads.openwrt.org/snapshots/ … pgrade.bin

So it seems I have the wrong ImageBuilder,

How do I correct this ?

I finally got it right to make my *own* custom installation with custom configuration files,

First I had to install Linux and VirtualBox, got the latest versions, I used Ubuntu 10.10 and had to install many
additional packages using the command apt-get install "xyz".

(1) I downloaded the trunk from svn, using the svn command : "svn co svn://svn.openwrt.org/openwrt/"

(2) Ran "make menuconfig" selected my Router as well as to build the ImageBuilder,

(3) run "make" : This takes quite a bit of time on a virtual machine.... WARNING!! be prepared to wait a long time
after everything is built,

(4) Locate the ImageBuilder in the bin folder (/openwrt_svn/openwrt/trunk/bin/ar71xx)
tar -xvjf OpenWrt-ImageBuilder-ar71xx-for-Linux-i686.tar.bz2

(5) Then follow the steps as documented here (http://wiki.openwrt.org/doc/howto/obtai … e.generate)

Hope this helps someone out there, good luck :-)

The discussion might have continued from here.