Hello, can someone explain how the openwrt uboot layout recovery ubi volume is supposed to work? Is it posible to force the router boot from it instead of from the standard kernel+rootfs ubi volumes?
Also, does the openwrt uboot layout tries to boot from a initramfs-recovery.itb image served over tftp before or after trying to boot from the local initramfs installed to the recovery volume?
I dont really understand that code, but just guessing I would say you can only force boot from the recovery ubi volume if you manually choose that in the uboot menu which would only be shown over serial, am I correct?
Or maybe by manually changing a var in ubootenv? (which would not be really useful if the ubi root volume is not working...)
The only other thing is this:
bootcmd=if pstore check ; then run boot_recovery ; else run boot_ubi ; fi
If your router is already running ubootmod you can recover using tftp. Setup a tftp server at 192.168.1.254 serving the file: openwrt-mediatek-filogic-xiaomi_mi-router-ax3000t-ubootmod-initramfs-recovery.itb
Press the reset button while powering on the router. This forces the router to go into tftp recovery mode, download the file and run the initramfs. After a minute or so you should be able to login at 192.168.1.1 and recover your router.
I've not tried it on this device but it has worked on other filogic routers running ubootmod. A quick look at a few of the ubootmod devices' code shows they all use the same logic.
Thanks, this also seems to make it boot from the internal recovery ubi volume without a tftp server, it looks like it first requests the initramfs itb image from tftp just one time only, and if not found over tftp it falls back to booting from internal recovery initramfs.