Yeah definitely if you were flashing back factory. It's not much of an issue for me as I have a decent script I use to create the dumb AP image, so has me back up and running very quickly. Taking a backup would be the obvious solution, so not much trouble to restore. It's just more of a concern why it happens in the first place.
I think it is worth taking this advice
As we know we can go back when necessary to stock so why worry. Also take a copy / backup using
sysupgrade options
backup-command:
-b | --create-backup <file>
create .tar.gz of files specified in sysupgrade.conf
then exit. Does not flash an image. If file is '-',
i.e. stdout, verbosity is set to 0 (i.e. quiet).
-r | --restore-backup <file>
restore a .tar.gz created with sysupgrade -b
then exit. Does not flash an image. If file is '-',
the archive is read from stdin.
-l | --list-backup
list the files that would be backed up when calling
sysupgrade -b. Does not create a backup file.
HTH
Ok. Interesting. I thought I would try this again as I couldn't understand why mtd
didn't work, but this time it did. The only thing I did differently was remove -n
I flashed both partitions with OpenWRT
From Part 2 (alt_kernel), I flashed Part 1 (kernel) as follows:
mtd -e kernel write /tmp/FW_MX56CF_1.0.1.216188_prod.img kernel
After the flash completed, I booted to Part 1 using Luci Advanced Reboot and it worked fine. A couple of important notes...
- You must leave the router to install properly after it boots. It takes a good 5-10 minutes. The flashing red ligt will eventually turn blue, but requires patience!
- This method will not reset stock to factory settings, so if you have issues with no DHCP etc, best to hard reset the device by holdin in the reset button on the bottom for 10 sseconds or so. If you do have access to the GUI, you can also do this under Troubleshooting > Diagnostics > Factory Reset (bottom right). Don't worry if you currently have other branding. This will reset correctly to whicever variant firmware you used.
Sysupgrade does work too, but it's strange that it kills the partition you are currently on, so not worth risking. I don't know why mine didn't flash correctly the first time. It could have been the -n
error checking, or possibly I didn't leave it long enough.
Using mtd
from a working partition should at least avoid the possibility of bricking as it doesn't alter the current partition (unlike sysupgrade
).
I did the same as you.
I thought it was probably shut down after red light blinking. So I turn it off and on manually.
tried
both partitions aren't working
partition 1 - Solid blue light. Cannot get IP from DHCP over ethernet
partition 2 - Solid blue light on for few second then off. Cannot get IP from DHCP over ethernet too[updated]
I also tried to long press the reset button for 20 secs. Nothing happened.
Sorry, can you clarify:
- you can't get get a DHCP address from WAN
or - your connected client device cannot get a DHCP address from OpenWRT?
If it's the client cannot get an IP address (I had this on my first flash), have you tried setting a static IP address on your client?
My client canβt get IP from the router
Yep, I had manually set the IP address to 192.168.1.10 and tried to access 192.168.1.1 but no success
I know a number of people get confused when flashing or upgrading images and some needing to use jtag to fix their screw up.
So hopefully you will find this script and its documentation of use.
Feel free to give feedback etc.
The script will be available for another 6 days and if beneficial I can make some permanent solution.
thanks for your great work!
i just got a replacement from CF today.
The stock firmware does not support SSH, am i correct?
You were lucky getting a new router....
Stock is locked down, so no ssh.
Download the FACTORY image from selector
Connect to router on http://192.168.1.1/fwupdate.html
Upload and flash FACTORY OpenWrt image to your new router.
MAKE SURE YOU WAIT FOR UPDATE TO COMPLETE
You should now be able to ssh in to the router and install fw_update which then gives you a 'safe' play tool.
For safety, I suggest use fw_update to do a SYSupgrade to the Alternative partition.
You then have 'working backup'.
To switch between partitions use fw_update -R
You can work / play on the same partition and if you really screw it up i.e. you can't connect to it then power cycle 3 times (waiting 2 seconds while powered on) and on the 4th power on you will boot in to your backup and be able to repair the faulty partition using fw_update again.
Any SYSupgrades should be done to the CURRENT partition so you never screw up the backup.
If you ever wish to go back to stock just use fw_update either TB or CF and flash the appropriate partition (likely NOT your backup).
Note - snapshots DO NOT have luci installed, use apk add luci
May I know is there any differences between above link and the manual upload section (after clicking CA mode)?
Would assume it is the same. If it breaks, you always have the second partition.
But why risk it when what I told you works !!!
sorry, it is because there's error message said "unauthorized" after I click update the image and I thought I did something wrong. But now I realised that I have to type the admin password again in the space provided in order to update. Now I have flashed latest OpenWRT SNAPSHOT successfully.
However, after I installed Luci and advanced-reboot, it shown both partitions are OpenWRT now. I thought the stock firmware update will update alternate partition only.
That is correct, the Linksys firmware shows as an old version of Linux.
The Alternative partition here as @msatt says is definitely stock. You can tell by the older Linux kernel version 5.4.164. If you see that, it'll be stock firmware
are you sure you mean JTAG or just a serial connection ?
Isn;t jtag serial via usb at 3.3v ?
No
Serial is 3-4 wires Transmit, Receive, gnd (and maybe +ve) via a device uart
JTAG is much more powerful and generally interfaces with a CPU directly and is more complicated to implement. Miniml connection is ~7 wires but full interface is usually 20
No point arguing - I taught comms for over 30 years.
TX,RX,RTS,CTS,DTR,DSR,DCD,GND plus many other variants. Serial has so many permutations so in one way or another I totally agree with you. But JTAG is still serial but as you say is used for much more sophisticated control.