Home Forum Developers IP0x de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

JRPassphrase Registration Control

In order to register on this site, you must first submit the passphrase below.

TODO list for each hardware target can be found as sticky topic in the corresponding forum


luckman212
useravatar
User Info

de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

hi guys,
I asked this before when it happened to me but I could never make it work.  So I bricked my unit today trying to flash a build of switchfin with Asterisk 1.6.  I posted about it over on the other thread but basically there seems to be some incompatibility between the G729 "hack" and v1.6 -- it works ok w/ 1.4 but 1.6 does not load and causes you to get locked out of the GUI as well with no asterisk running.

I was not excited to have to disassemble my ip02 again and attach serial console, stretch cat5 cables across the room etc etc to flash it with uBoot.  So I was determined to figure out if I can debrick it without -- because I could still ping the unit and actually I could still SSH into it (dropbear is running).

anyway I knew the basic steps:
-place the uImage into /persistent/imageupdate
-flash the image
-reboot the unit

but I keep failing MD5 checksum when I did this (I checked in the "/persistent/imageupdate/flashresults" file)  I was using FTP (binary mode) to transfer the uImage.  I guess this was somehow the problem because the image is getting corrupted somehow during transfer.  So I want to use TFTP instead but I do not know the syntax.  So I dig through the switchfin-GUI source files

Code:

$cd switchfin

$find . -name *update.html
./dl/asterisk-gui-4.0/config/flashupdate.html

inside contained the proper syntax! (thanks Jason) big_smile

Code:

tftp -g -r uImage-md5 192.168.1.10

(substitute 192.168.1.10 for the actual IP of your TFTP server hosting the uImage-md5 file)

now, here is the full procedure:

1) build new uImage-md5
2) place on tftp server
3) ssh into IP0x and execute these commands

Code:

cd /persistent/imageupdate

echo 3 > /proc/sys/vm/drop_caches
tftp -g -r uImage-md5 192.168.1.10
flashupdate file ./uImage-md5

... wait -- cross fingers, and if successful ...

Code:

reboot

I hope this might help somebody else who might get into the same situation.
cheers


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

Hi Luke

here is an easier way!

Code:


cd /persistent/imageupdate
tftp -g -r uImage-md5 192.168.1.10
mv uImage-md5 uImage
reboot

also if you want to reset the configs run the following before the reboot cmd

Code:


touch /persistent/imageupdate/.clear_persistent


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

cool, thanks Jason..... now If I can just figure out why the heck madplay isnt working!!!


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

altering the res_musiconhold is a bit over my head Dimitar may be able to help with that one!

oh and a quick note on the FTP the reason the MD5 fails is because you need to tell your FTP client to preserve timestamps - had the same issue yesterday :-)


Administrator has disabled public posting
luckman212
useravatar
User Info

Re: de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

hmm that's weird, I didn't know the timestamp was part of the hash.  I mean on my windows pc If I change a timestamp of a file and re-hash it I get the same MD5.  Also, my ftp client did have the preserve timestamps enabled, well anyway who knows... at least I know how to work around it now!  Haven't heard much from Dimitar lately maybe he's on holiday hehe
http://i.imgur.com/UNQmP.png


Administrator has disabled public posting
Albi90
useravatar
User Info

Re: de-brick an IP0x if you can still ssh in but no asterisk & no GUI runs

mmmm maybe switchfin ftpd doesn’t support it, Dimitar has had his head in the Attrafax code making it Fixed point compatible.


Administrator has disabled public posting

Board Info

Board Stats:   Total Users: 2587  Total Topics: 299  Total Polls: 1  Total Posts: 1727  Dormant
User Info:   Newest User :  user2553   Members Online: 0   Guests Online: 378
Online  There are no members online
Topic
New
Locked
Topic
New
Locked
Sticky
Active
New/Active
Sticky
Active
New/Active
New/Closed
New Sticky
Closed/Active
New/Locked
New Sticky
Locked/Active
Active/Sticky
Sticky/Locked
Sticky Active Locked
Active/Sticky
Sticky/Locked
Sticky/Active/Locked