3

How do I reimage openwrt in such a way that all my settings will be lost. I've been having some issues, and I want to ensure that it's not a lingering setting, I want this to be a fresh install.

  • You might want to take a look into gargoyle, also an open-source router firmware for the WRT family. Personally, I've found it much easier to use. – Ken Jan 22 '11 at 8:25
  • @ken please give more info here – xenoterracide Jan 22 '11 at 8:53
2

OpenWRT versions from Kamikaze onwards (which is basically Kamikaze and Backfire, but not White Russian) do not use NVRAM to store settings or configuration. It is all stored in the filesystem, either in the base squashfs image or the overlayed jffs image. This means you should be able to re-flash the image and get back to "factory defaults".

The way to flash an OpenWRT image is described at http://wiki.openwrt.org/doc/howto/installing . Once you have OpenWRT installed the first time, the easiest way to reflash is to use the "via the OpenWrt command line" method. Pay attention to the differences between .trx images and .bin images. .trx images are "raw" generic openwrt images used by the command line installation method. .bin images have vendor-specific headers and, so you need to have the appropriate image for your router.

There are some settings stored in NVRAM that are used by the bootloader but I don't think they should persist once the Linux image has booted. Possibly MAC addresses may persist, but can be overridden in the filesystem configuration anyway.

Whatever you do, do not indiscriminately wipe the NVRAM. You will almost brick the device, and may be bricked unless you can find on the net the appropriate settings to restore manually for your device.

  • what'st the appropriate way to reflash though? commands and such – xenoterracide Jan 22 '11 at 10:46
  • @xenoterracide: see edit – camh Jan 22 '11 at 10:58
  • man I swear what annoys me about openwrt is depending on which link I pull up, depends on which directions I get. – xenoterracide Jan 22 '11 at 11:09
  • @xenoterracide: Keep at it. You'll find plenty more things to get annoyed about :-) – camh Jan 22 '11 at 11:20
  • heh, well this whole thing came up because I'm once again playing with my firmware due to running into bugs in the latest openwrt, and I'm tired of working around them. – xenoterracide Jan 22 '11 at 12:09
1

What is your issue?

If your issue is, that you are developing, and you want to be sure that your latest changes in your build process really are copied into the new firmware image, you don't have to "reimage OpenWRT" (whatever that should mean)

To analyze your freshly created openwrt bin image file you can use

binwalk -e imagefile.img

this will unpack the image so you can look inside the folder structure if everything is there in the correct place and has the correct permissions set (executable, readeable,...)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.