upgrading/installing firmwares using linux
upgrading/installing firmwares using linux
How do I upload RT firmware using linux?
I got rid of my win98 box before I realised that I still depended on it for this function.
I got rid of my win98 box before I realised that I still depended on it for this function.
Now son, this is the safe way to... ohh?
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
What is your router?
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
For the SWART2, you can use scp or wget or whatever, to transfer the firmware image to the router's /var directory, and then run this command (after connecting via telnet/ssh - and assuming that the firmware image is called "fw.bin")
This is for a single-image upgrade.
Code: Select all
cd /var
upgrade -f fw.bin
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
I thought I had understood the man pages for scp, but the closest I have got so far is:
(Some of the output was cut but I hope that the key info remains.)
What am I doing wrong?
(The current firmare on the unit is your first version for the tnet1350 card.)
Code: Select all
alistair@unit:/home$ scp -4vp RouterTech_3.7.1B_1350A_20081123_2.80_AR7WRD_psbl_firmware.upgrade.img root@192.168.1.1:/var
Executing: program /usr/bin/ssh host 192.168.1.1, user root, command scp -v -p -t /var
.
.snip
.
root@192.168.1.1's password:
debug1: Authentication succeeded (password).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: Sending environment.
debug1: Sending env LANG = en_GB.UTF-8
debug1: Sending command: scp -v -p -t /var
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
scp: No such file or directory
debug1: channel 0: free: client-session, nchannels 1
debug1: fd 0 clearing O_NONBLOCK
debug1: fd 1 clearing O_NONBLOCK
debug1: Transferred: stdin 0, stdout 0, stderr 0 bytes in 0.1 seconds
debug1: Bytes per second: stdin 0.0, stdout 0.0, stderr 0.0
debug1: Exit status 127
lost connection
alistair@unit:/home$
What am I doing wrong?
(The current firmare on the unit is your first version for the tnet1350 card.)
Now son, this is the safe way to... ohh?
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Use WinSCP. It works pretty fine under WINE. But it also requires your firmware to have functional dropbear and scp binaries. Perhaps the safecom firmware doesn't have scp - in which case you will need to use wget.
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Thanks TheChief.
I used 'ftp' to 'put' the firmware onto the unit.
Having logged into the remote server in 'ftp' I declared the file 'type' to be 'image' (the file is binary rather than the 'ftp' default of ascii.)
I then 'put' the .img file from the local directory to the remote /var/ directory as you suggested.
It happened so quickly that I did not realise at first that the file was self-extracting and upgrading!
(Is the "'dot'upgrade" part of the filename a command?)
"All" I have to do now is wait until the family have come off their machines so that I may plug it into the line!?!
Would it be worth adding some notes to the documents for us new to linux?
I used 'ftp' to 'put' the firmware onto the unit.
Having logged into the remote server in 'ftp' I declared the file 'type' to be 'image' (the file is binary rather than the 'ftp' default of ascii.)
I then 'put' the .img file from the local directory to the remote /var/ directory as you suggested.
It happened so quickly that I did not realise at first that the file was self-extracting and upgrading!
(Is the "'dot'upgrade" part of the filename a command?)
"All" I have to do now is wait until the family have come off their machines so that I may plug it into the line!?!
Would it be worth adding some notes to the documents for us new to linux?
Now son, this is the safe way to... ohh?
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Using the firmware's own ftp server does result in the server automatically trying to upgrade the firmware with whatever was uploaded. This can be dangerous if this is not what you are trying to do - which is why no-one has mentioned it. If you use a means other than ftp to send the file over, then you still have to do the second step of running "upgrade". This is the preferred method, because it at least gives you a chance to back out!
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Re: upgrading/installing firmwares using linux
Hello,
I'm tring to upgrade 2.91 to 2.91.1 from ssh
I renamed the image Router.img and loaded it with wget to /tmp/var
After executing
upgrade -f Router.img
the system announces "Timeout, server not responding" and I simply have no result, the firmware image I see after reboot being the same as previous.
NB: I already tested and used dd if=/var/RouterTech.img of=/dev/mtdblock/4 for flashing
I tried with normal image and annex B ports adam2 on Dlink G 604 T
Do you have ideas?
Thanks, Paolo
I'm tring to upgrade 2.91 to 2.91.1 from ssh
I renamed the image Router.img and loaded it with wget to /tmp/var
After executing
upgrade -f Router.img
the system announces "Timeout, server not responding" and I simply have no result, the firmware image I see after reboot being the same as previous.
NB: I already tested and used dd if=/var/RouterTech.img of=/dev/mtdblock/4 for flashing
I tried with normal image and annex B ports adam2 on Dlink G 604 T
Do you have ideas?
Thanks, Paolo
Last edited by tiepolo on Tue Oct 06, 2009 12:52 pm, edited 1 time in total.
Paolo
Re: upgrading/installing firmwares using linux
Ideas:-
The file must be uploaded to "/var"
If you are using a minix nvram you must "umount /nvram" before upgrading firmware.
You have a D-Link with badly fragmented adam2
The file must be uploaded to "/var"
If you are using a minix nvram you must "umount /nvram" before upgrading firmware.
You have a D-Link with badly fragmented adam2
Re: upgrading/installing firmwares using linux
/tmp/var is linked to /var - they're the same;
I tried again after defrag, the new firmware went up this time but it was impossible to get adsl connection. I had to repeat procedure from web;
The Linux upgrade could still be necessary if the new firmware demands a repartitioning of the memory.
Paolo
I tried again after defrag, the new firmware went up this time but it was impossible to get adsl connection. I had to repeat procedure from web;
The Linux upgrade could still be necessary if the new firmware demands a repartitioning of the memory.
Paolo
Paolo
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: upgrading/installing firmwares using linux
Not in any RT firmware that I know of.tiepolo wrote:/tmp/var is linked to /var - they're the same;
I use this procedure all the time, and the only times it has failed to work was when I forgot to unmount the /nvram minix partition. It should work, so I am not sure what the problem is.tiepolo wrote:I tried again after defrag, the new firmware went up this time but it was impossible to get adsl connection. I had to repeat procedure from web;
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Re: upgrading/installing firmwares using linux
1) /var and /tmp/var are not the same -
True, I was using /var which is linked to /tmp/var in other firmware;
2) I wasn't probably able to umount /nvram
this could be the point -
what's the exact command?
Thx!
True, I was using /var which is linked to /tmp/var in other firmware;
2) I wasn't probably able to umount /nvram
this could be the point -
what's the exact command?
Thx!
Paolo
- thechief
- RouterTech Team
- Posts: 12067
- Joined: Wed Feb 01, 2006 10:22 pm
- Location: England, the Centre of Africa
- Contact:
Re: upgrading/installing firmwares using linux
Code: Select all
umount /nvram/
The Chief: Be sure to read the Firmware FAQ and do a Forum Search before posting!
No support via PM. Ask all questions on the open forum.
No support via PM. Ask all questions on the open forum.
Re: upgrading/installing firmwares using linux
I didn't volountarly created a minix partition.
I executed
umount /nvram
and got an error message;
Do you think the fact of executing the upgrade from remote can have an influence?
I executed
umount /nvram
and got an error message;
Do you think the fact of executing the upgrade from remote can have an influence?
Paolo