Hello. I'm new to OpenWrt, so I have a question about how to return to stock firmware on my Linksys EA8300 if something will go wrong.
From wiki I got that only way to return back to stock firmware is "triple boot failure" method, if stock firmware sill exist on "secondary partition". But if I upgrade my OpenWrt it will overwrite that "secondary partition".
Why it is not possible just flash stock firmware image from OpenWrt GUI?
I've just got my router from Ebay and it is running on stock firmware. I want to better understand the whole process and have backup plan before flashing custom firmware like OpenWrt.
Ok fine.
From Linksys, flash openWrt using factory file. You will now boot from partition 2 with Openwrt. Configure as you wish, and backup the settings.
In OpenWrt, install the package luci-app-advanced-reboot. It will allows you to select the Linksys partition 1 as boot. It's easier than the "three boot failure" switch method.
To upgrade openWrt, NEVER use a sysupgrade file: it will be flashed on partition 1, and you will lose Linksys firmware. Use advanced reboot to switch to Linksys, and than flash a FACTORY image of Openwrt. It will be stored on partition 2. Don't forget to restore your settings, and you're up.
If you were foolish to perform a 'forced' install the linksys OEM firmware via LuCI or sysupgrade via SSH method onto the alternate partition, you'd probably brick it.
Always switch the Linksys router to booting from Linksys OEM firmware and then install new factory image version of OpenWrt from Linksys UI, as advised by @badulesia
I don't worry about not having stock firmware on one of the partitions anymore. It's pretty easy to copy the stock firmware to /tmp and run the command here:
Agreed.
You meant "NOT having" ?
As long as the other partition contains a proper OpenWrt, you will always be able to flash back Lynksys firmware. But I like to run stock firmware ... just to remember how limited it is comparing to OpenWrt
Yes it would appear the the instructions for reverting to stock on this device are a little misleading and would probably brick the partition. From the device page, the "kernel+rootfs+rootfs_data" partitions are clearly mtd10 and mtd12 when the command cat /sys/devices/virtual/ubi/ubi0/mtd_num will give you either 11 or 13
The correct method to get current firmware partition would be:
Booting into stock firmware and applying a factory.bin will also wipe the overlay_fs partition. Booting into stock firmware and applying a sysupgrade should be ok if the alt partition already has openwrt on it thus preserving settings and installed packages. You might need to fix opkg sources though.
If you upgrade using this method you will also have to reinstall any extra packages you need to use since a factory install wipes the other partition giving you a default new install.
That is certainly something to consider while you are evaluating OpenWrt, but once you've settled and know what works- and what doesn't, you can pretty much ignore this. Just use the round-robin updating in your favour, and you'll always have the previously working (older-) OpenWrt version at your disposal, which was at least good-enough to allow you flashing the newer one you're currently running.