wiki:sshflash

Flashing the Fonera 2.0 via SSH

To be able to access your Fonera 2.0 using the ssh protocol you need to be running a "Development" version of the firmware. "DEV" version of the firmware can be downloaded from http://download.fonosfera.org Username is "root"; password is the one you use to access Fonera's WebUI (default: "admin")

Upload a custom firmware to the Fonera

  • If you store the firmware image locally you may use SCP or WinSCP to upload the file in the /tmp directory of the Fonera.
  • If the custom image is available on the Internet you may connect via ssh to the Fonera and type the following:
    # cd /tmp
    # wget http://path.of/filename.img
    

Write firmware image to the Fonera

Connect to your Fonera 2.0 via ssh and type the following:

# mtd -r write /tmp/filename.img image

Depending on the hardware version of the Fonera the operation may take up to 20 min (early 2.0g models are slow, 2.0n models should be done in just a few minutes). Then the Fonera will reboot initiating the custom firmware.

Note: this operation will give you a clean firmware, your configuration changes will be lost

Preserving your configuration

To preserve your configuration, use the following commands:

save-config.sh
mtd -j /tmp/sysupgrade.tgz -r write /tmp/filename.img image

The save-config.sh script will collect configuration data in a file called /tmp/sysupgrade.tgz. Then mtd will put those files in the newly created JFFS partition, so they are available after the reboot.

Note that the save-config.sh script is available starting from the 2.3.7.0 beta1 firmware release. If you have an earlier firmware, you can get this script by running:

wget -O /sbin/save-config.sh http://trac.fonosfera.org/fon-ng/export/HEAD/trunk/luci/modules/admin-fon/root/sbin/save-config.sh
chmod +x /sbin/save-config.sh

After this, just run the commands above.

Last modified 5 years ago Last modified on May 1, 2012, 5:36:09 PM