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.

This operation will give you a clean firmware, your configuration changes will be lost

To preserve your configuration, you can first make a dump of (most) configuration files and then ask mtd to put those files in the newly created JFFS partition. To do this, use the following commands:

tar cvzf /tmp/sysupgrade.tgz /etc/passwd /etc/group /etc/dropbear /etc/samba/smbpasswd /etc/samba/secrets.tdb /etc/config/firewall /etc/config/upnpd /etc/config/umtsd /etc/config/registered /etc/config/gdata /etc/config/facebook /etc/config/flickr /etc/config/mountd /etc/config/fon /etc/config/ddns /etc/config/wizard /etc/pureftpd.passwd /etc/pureftpd.pdb /etc/config/pureftpd /etc/config/samba /etc/config/luci_dlmanager /etc/config/twitter
mtd -j /tmp/sysupgrade.tgz -r write /tmp/filename.img image

The list of files that need preservation might change: For a current list, see the action_backup function, somewhere around here in fon_admin.lua.