MTD to flash stock via SSH?

Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.)
Goto page Previous  1, 2
Author Message
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 0:14    Post subject: Reply with quote
Go for the most basic straightforward working configuration possible for now and disconnect any USB.
Sponsor
Pumpino
DD-WRT Novice


Joined: 02 Jan 2019
Posts: 18

PostPosted: Fri Mar 27, 2020 0:17    Post subject: Reply with quote
blkt wrote:
Go for the most basic straightforward working configuration possible for now and disconnect any USB.


OK, thanks.

And I should use the "write" command rather than "mtd"? And I use "linux" rather than "linux1"?
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 0:19    Post subject: Reply with quote
No, those write instructions are for upgrading DD-WRT with a webflash image.

There is no linux1, it does not exist. Please read carefully.

You need to know exactly what you are doing with mtd otherwise you will likely dig yourself a deeper hole, requiring serial flash.

You should be able to GUI flash stock Linksys firmware after upgrading DD-WRT.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 14125
Location: Texas, USA

PostPosted: Fri Mar 27, 2020 1:09    Post subject: Reply with quote
His build is after the fix for reverting to stock in 2017. If it's not working, then it is a specific issue with the 1200s or it's because there is a larger problem. Thank you for stepping in @blkt, because I was about to lose my marbles.

IF it won't flash stock firmware after the upgrade, then you have no choice but to use serial recovery.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 1:21    Post subject: Reply with quote
It could be browser, third party security software or firewall issues too. Disable them.

I use Waterfox, Pale Moon or Firefox Legacy Portable (45/52 ESR).
Pumpino
DD-WRT Novice


Joined: 02 Jan 2019
Posts: 18

PostPosted: Fri Mar 27, 2020 2:23    Post subject: Reply with quote
blkt wrote:

cd /tmp

wget http://download1.dd-wrt.com/dd-wrtv2/downloads/betas/2020/03-25-2020-r42803/linksys-wrt1200ac/ddwrt-linksys-wrt1200ac-webflash.bin

write ddwrt-linksys-wrt1200ac-webflash.bin linux

ubootenv set boot_part 1

reboot


I managed to get internet access and execute the commands above. Unfortunately, this hasn't helped. Upon rebooting to partition 1, as before, I can't even ping the router.

Would using MTD be more effective?
Pumpino
DD-WRT Novice


Joined: 02 Jan 2019
Posts: 18

PostPosted: Fri Mar 27, 2020 2:33    Post subject: Reply with quote
It's fixed.

I powered off three times and when it booted, it booted to the latest version of dd-wrt. I confirmed that partition 2 was active. It must have flashed partition 2 rather than partition 1 (while partition 2 was booted). Weird.

I flashed stock from there and rebooted, and it booted to partition 1 running stock.

For whatever reason, the 8/1/2018 build of dd-wrt that I had to use to get dd-wrt to flash correctly wasn't flashing stock or any dd-wrt build (old or current) to partition 1.

I'll flash OpenWrt now and stop fiddling.

Thanks for your patience, blkt. Smile
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 2:50    Post subject: Reply with quote
The write sequence to upgrade dd-wrt will check the current boot_part value and write to the opposite.

Last edited by blkt on Fri Mar 27, 2020 2:55; edited 2 times in total
Pumpino
DD-WRT Novice


Joined: 02 Jan 2019
Posts: 18

PostPosted: Fri Mar 27, 2020 2:51    Post subject: Reply with quote
blkt wrote:
The write sequence to upgrade dd-wrt will check the current boot_part value and write to the opposite.


It didn't though. I used write from partition 2 and then partition 1 still wouldn't boot. When I booted into partition 2 after powering off three times to switch partitions, it booted the new build of dd-wrt.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 2:54    Post subject: Reply with quote
Did you check which partition you were really on before flashing?

ubootenv get boot_part

If you followed my instructions, it wrote to the opposite inactive partition after it verified the current setting.
Pumpino
DD-WRT Novice


Joined: 02 Jan 2019
Posts: 18

PostPosted: Fri Mar 27, 2020 3:01    Post subject: Reply with quote
blkt wrote:
Did you check which partition you were really on before flashing?


Yes, I was definitely flashing from partition 2.
blkt
DD-WRT Guru


Joined: 20 Jan 2019
Posts: 5660

PostPosted: Fri Mar 27, 2020 3:04    Post subject: Reply with quote
If that's true, then it would have overwritten the first partition. The other case is if you specified linux2, bypassing the initial check.

Maybe there was an error detected and then it wrote to the current partition? Without logs I have no idea, just a guess.

I've never seen that happen though. Anyway, glad stock is installed and the bad partition overwritten.

Any time you enter a different environment (dd-wrt, stock, openwrt etc.) do a hard reset after the successful flash and boot.
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Marvell MVEBU based Hardware (WRT1900AC etc.) All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum