What's new

Firmware flashing via SSH.

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

P

podkaracz

Guest
Hi,

I would like to ask you for help with flashing my router with SSH method. I saw video on youtube which shows steps needed to do it. I understand that its not the safest way to upgrade because many comments suggested web ui is better, but ssh should give me more stable flash over web from what ive seen, anyways even if things go wrong its still possible to recover with asus firmware. So my question is what commands to use in putty when i get there i get command : -sh: mtd-write2: not found

My router : ASUS RT86U

I suspect its the firmware file that is different becouse on the video its trx formatted and here its just "u".

Here is the video i watched :
 
Last edited by a moderator:
I strongly suggest using the firmware recovery tool. It uses TFTP I think to upload to the device, this is somewhat like what SSH would do but far safer.
 
I strongly suggest using the firmware recovery tool. It uses TFTP I think to upload to the device, this is somewhat like what SSH would do but far safer.

I mean i could but its not used for casual firmware flashing (or i dont know how to make it casual flashing tool ), just when router is bricked and my router is not bricked.

#Also if you dont want to reveal how to do it publicly please write private message this way people wont follow those steps ( more work for you in helping them later if something goes wrong) and ill know how to do it on asus rt86u.
 
I mean i could but its not used to casual firmware flashing just when router is bricked and my router is not bricked.
You can use the firmware recovery tool at any time and never any harm done. It's a very good way to do a firmware update but it essentially resets the system to defaults in the process.
 
Firmware recovery tool is used any time the end user is unable to use the webui method.
 
You can use the firmware recovery tool at any time and never any harm done. It's a very good way to do a firmware update but it essentially resets the system to defaults in the process.


When the software is in use it hangs for 20 seconds and nothing happens for me right now when i point to the firmware file. Im wired connected and it says "wireless device in recovery mode not found" So how do i use it for upgrade?
 
Im able to use webui method but i dont want to , I want to use ssh method.
A long time ago @RMerlin advised me to not do it, as there are many things that can go wrong. Why would you temp fate unless you have money to throw away? There have been many cases since I signed up here of bricked routers, so your idea that you cannot brick a Asus router, is flat out misinformed. Yes it's hard to brick, but it can be done and this is one of the ways it can be done.
 
When the software is in use it hangs for 20 seconds and nothing happens for me right now when i point to the firmware file
Yeah well upgrading firmware by SSH isn't the go to fix for that.
 
Yeah well upgrading firmware by SSH isn't the go to fix for that.

I mean i had some troubles with rebooting/firmware upgrading becouse all went smooth and my ping was unstable after first upgrade+initialize and i found out many people stating flashing over ssh solved some problems. Is there a way i can erase everything in the router so that im 100% sure my firmware was uploaded correctly or ssh is the only way?
 
When the software is in use it hangs for 20 seconds and nothing happens for me right now when i point to the firmware file. Im wired connected and it says "wireless device in recovery mode not found" So how do i use it for upgrade?
You have to put the router into recovery mode. This is done by pulling the power plug and while holding the reset button with a toothpick and plugging the power back in the light will blink slowly when in recovery mode.
 
I mean i had some troubles with rebooting/firmware upgrading becouse all went smooth and my ping was unstable after first upgrade+initialize and i found out many people stating flashing over ssh solved some problems. Is there a way i can erase everything in the router so that im 100% sure my firmware was uploaded correctly or ssh is the only way?
Follow my instructions (post #11), to get into recovery mode and use the firmware recovery tool.
 
This gives you a clean slate.
 
Erase (last two bullet points)
https://www.snbforums.com/threads/faq-nvram-and-factory-default-reset.22822/
How do I do a factory default reset?
Multiple ways to do so, which will depend on your particular situation.

If your router fails to boot due to corrupted/invalid nvram settings, then you will have to turn off the router, press the WPS button (on Asus routers), then turn on the router. Wait about 10 seconds, then release the WPS button.

If the router is booting correctly, then you can use any of the following:

  • While router is running, press the reset button for about 5 secs, then release it. Router will then reboot.
  • From the webui, on the same page where you can save/restore saved settings, there is a button to restore factory default values
  • Over SSH, you can run the "nvram erase" command.
  • Over SSH you can manually erase the nvram partition (do not use this method unless you know what you are doing! Erasing the wrong partition can permanently brick your router!) Run "mtd-erase nvram", followed by PHYSICALLY turning off then on the router. Do not use the reboot command.
Flash
https://www.snbforums.com/threads/how-can-force-flash-fw-using-telnet-or-ssh.11558/#post-72160
 
I tried to use Firmware Restoration but router seems to be in recovery mode for like 5 seconds and then it boots normally and the tool stops mid way saying it failed and router works normal. So probably if ur router is not really bricked it wont work. Also i used Rmerlin command and it said sh not found or something.
 
I tried to use Firmware Restoration but router seems to be in recovery mode for like 5 seconds and then it boots normally and the tool stops mid way saying it failed and router works normal. So probably if ur router is not really bricked it wont work. Also i used Rmerlin command and it said sh not found or something.
You have to hold the reset button not the WPS button. This will work if the router is successfully put into recovery mode.
 
You have to hold the reset button not the WPS button. This will work if the router is successfully put into recovery mode.

I mean i hold reset button then i unplug power cord and then while holding i put power in agian it puts my router in recovery mode for like 5 seconds and when the tool finally starts to work it goes to 50% and it says it failed and my router works normally.
 
I mean i hold reset button then i unplug power cord and then while holding i put power in agian it puts my router in recovery mode for like 5 seconds and when the tool finally starts to work it goes to 50% and it says it failed and my router works normally.
You don't have the right file then. Make sure the file you are uploading ends with a "w"
 
You don't have the right file then. Make sure the file you are uploading ends with a "w"

RT-AC86U_3.0.0.4_384_45717-gadd52a8_cferom_ubi.w

100% right file

Also i found something weird now it went like 80% uploading and it says "automatic system recovery" is on 60% even tho i use router normally and the program claims to work now . I think this program is the biggest mess ever if you dont use it to unbrick just for simple upgrade purposes.
 
Should look like this: RT-AC86U_384.13_alpha2-g350d39b194_cferom_ubi.w
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top