Upgrading La Fonera to 0.7.1 r2 (aka 0.7.1.2)
Posted by coldtobi | 10 Mar, 2007, 13:41If you open the fonera, a requirement for this is , that you have to reset you fonera to an older firmware version. (If you have flashed the 0.7.1 r2, you'll have to wait till Kolofonium is released.)
But if you want also wants the benefits of the newer firmware version, and ensuring your access via SSH, you'll have to update it manually.
By the way: At the moment, currently fon only send "hotfixes" via the automatic update. As hot fixes are not permanently flashed, so there is a way back.
For this instruction, I assume some basic knowledge about unix shells and that the fonera in question is already accessible by ssh.Important: If you're updating, please also read: Safe updating to 0.7.1 r3
A Note before we start:
The oldest Fonera Version I have is 0.7.0 r4 (interesting is, that this Fonera was shipped in Jan 07), so this instructions may be not valid with older versions.
Finding out the version.
Login to your Fonera. Do a
root@OpenWrt:~# cat /etc/fon_*
You'll get something like that:
foneraThe first line (file) is /etc/fon_device, tells, that this is a La Fonera. The seond is /etc/fon_revision, telling the revision of the firmare, while the last file, /etc/fon_version tells the main version of the box.
2
0.7.1
Evaluating the update wishes.
Every hour, the La Fonera calls home. It will query the servers, if there is something to configure or if there is a firmware update available. It doing so, by connecting to download.fon.com via ssh. The server response will be stored in /tmp/.thinclient.sh. This file is a shell script, which is expected to be launched after downloading. Usually, when obtaining ssh to the box, /bin/thinclient is modified (its also a shell script) to disable the automatic execution, and/or it is renamed for later evaluation. Just cat "your" /tmp/.thinclient.sh
Here's an example, for a box with version 0.7.0 r4:
cd /tmpUpdating
wget http://download.fon.com/firmware/update/0.7.0/4/upgrade.fon
/bin/fonverify /etc/public_fon_rsa_key.der /tmp/upgrade.fon
cd /tmp
wget http://download.fon.com/firmware/update/0.7.1/1/upgrade.fon
/bin/fonverify /etc/public_fon_rsa_key.der /tmp/upgrade.fon
rm -f /tmp/.thinclient.sh
exit
Thee are two updates: downloading and installing it.
At current, the two mentioned updates (0.7.0 r4 -> 0.7.1r1 > 0.7.1r2) are not interfering with ssh (but enables upates again). As this could be easily changed by fon, we have also to validate the update.
To do so, we download the patched manually, and get an hash over the files.
root@OpenWrt:~# wget http://download.fon.com/firmware/update/0.7.0/4/upgrade.fon -O upgrade1.fon
root@OpenWrt:~# wget http://download.fon.com/firmware/update/0.7.1/1/upgrade.fon -O upgrade2.fon
root@OpenWrt:~# md5sum upgrade*.fon
e337528b45b64145bfdd484507055230 upgrade1.fon
f502ed80464240658212b34a0d6f4170 upgrade2.fon
root@OpenWrt:~# cp /bin/thinclient /bin/thinclient_bak
Please check the md5sums of the scripts. If they changed, then please stop updating, and drop me a comment. (note, they are moderated, so the do not appear right away.) The last line just backups /bin/thinclient.
if the md5sums are identical, then feel free to upgrade the firmware:
/bin/fonverify /etc/public_fon_rsa_key.der /tmp/upgrade1.fon ;
/bin/fonverify /etc/public_fon_rsa_key.der /tmp/upgrade2.fon
Finishing
The second update will overwrite/bin/thinclient. You might want to restore it, or at least disable updates again If you followed my shell commands, you have a backup at /bin/thinclient_bak to restore.
<—&mdash Showing ERROR? Click here!
La Fonera | Comments (0) | Trackbacks (0)
Related Articles:
- [Updated] La Fonera: A bunch of Autoupdates (to 0.7.2.2)
- Installing Debian on the Thecus N2100 -- PART 3 -- Installing Debian
- La Fonera: Autoupdate to 0.7.1.5
- Installing Debian on the Thecus N2100 -- PART 1 -- Preparation for install
- Thecus N2100: Testing a new kernel. Or the Installer. Or Revert. Or Recover.