@babyangelhp can you send me the FULL boot log? you had already posted this error message but i want to see how far it gets without this.
as for restoring stock... don't worry it's actually really easy to do (even if your system is completely messed up)... you just reverse the steps you took when telling the router to boot openwrt... unfortunately i don't have my UART handy (and it's a little hard for me to take the router offline)... maybe @pjgowtham or @andreykiselev can double check (it's in the uboot menu.. you basically set the flag_try_sys2_failed to 1 and flag_try_sys1_failed to 0.. then remember to save the settings and reboot)
now that you're on stock, to install openwrt you're going to setup a tftp server (on a pc), connect it (via ethernet) to the router, setup the IP settings (they have to be on the same subnet) and boot from it (again from the uboot menu)... there are online guides for setting up a tftp server.
anyway, once you've tftp booted (you're going to use the "initramfs" file, not "sysupgrade" or "factory") then you'll just do a sysupgrade and all should be well. oh and you'll need to make sure those flag_try_sys_failed settings are setup so your system is set to boot from sys2 (that is, sys1 should be "failed")
however, it would be nice (since you have an UART anyhow) to first install openwrt the "regular" way, save the bootlog, and then do the tftp thing (you won't need to restore to stock first). there's probably a bug there and it would be nice to at least have it filed or known.
@ilyas
I used the "initramfs" file and successfully installed openwrt on mi pro, but upon reboot the device immediately reverted to the stock firmware. After installing the "initramfs" file, do I need to install the "sysupgrade" or "factory" firmware?
I did the following:
Access ssh then use the command:
nvram set flag_try_sys1_failed = 1
nvram set flag_try_sys2_failed = 0
nvram set flag_boot_success = 0
nvram commit
Next I used the usb to install the "initramfs" file using tftp.
The installation was successful, but when the device reboots, it will return to the stock firmware.
@babyangelhp
right. so you're going to want to make sure you only boot (not install) the initramfs file. it sounds like you already did that. after you've booted that, do a sysupgrade using the "sysupgrade" file. then you should be fine.
A short note here for those who (just like me) have problems with a UAS driver and USB3 external drives. The symptoms are that the device is recognized and you can see it with lsusb -t command. The driver lists uas, but the drive does not show up in /dev/sd*.
root@AndyNet:~# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/1p, 5000M
|__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=uas, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-mtk/2p, 480M
At the same time, drives using usb-storage driver work well. Unfortunately, removing the kernel module or actually removing the module file does not solve the problem and the drive is listed without any driver at all. So, the solution is to set a quirk to hint the system to use a specific driver for the drive:
Get the ID of the external drive with lsusb -v. There should be something like Bus 002 Device 002: ID 059f:105e LaCie, Ltd. Be careful to look for the actual device, not the USB hub.
Edit /etc/modules.d/usb-storage and append quirks=DEVICE_ID:u, so in my case the line looks like usb-storage quirks=059f:105e:u
Save and reboot. After reboot, check lsusb -t should list your drive with usb-storage driver instead of uas. And the drive should appear in /dev/.
Enjoy!
A side note, I do have kmod-usb-core, kmod-usb3, kmod-usb-storage, and kmod-usb-storage-uas installed. And I do NOT have kmod-usb2 and kmod-usb-storage-extras.
I am wanting to apply OpenWRT again but would not want to go through the same issues again.
I had the same problem that many reported here, after installation, when the router is restarted, all the initial version returns, does not save the changes, it is necessary to install LUCI again, etc.
the solution we recommend is to do a sysupgrade (after installation) to the same version ("sysupgrade" file) for cases where this happens. have you tried it?
@adilson for sysupgrade you can use the command-line (it's pretty simple... copy/ftp/scp the "sysupgrade" file to your router and then run sysupgrade with the filename as an argument). if that's not clear, you can also install luci and use the luci interface to "upgrade" your system (again, to the same version). the goal is just to shuffle the bits around the disk.
I used the "initramfs" file and successfully installed openwrt on mi pro, but upon reboot the device immediately reverted to the stock firmware. After installing the "initramfs" file, do I need to install the "sysupgrade" or "factory" firmware?
I did the following:
Access ssh then use the command:
nvram set flag_try_sys1_failed = 1
nvram set flag_try_sys2_failed = 0
nvram set flag_boot_success = 0
nvram commit
Next I used the usb to install the "initramfs" file using tftp.
The installation was successful, I then used the sysupgrade file to update from Luci but my device got bricked and blinked in a yellow light
Not an error, actually. Message just states you already have an existing config file (/etc/config/samba4). If you don't need existing one just delete it and move /etc/config/samba4-opkg to /etc/config/samba4 to use config provided with package.
But if your existing config it tailored to your needs you're probably don't need to start over So, just ignore this "error" message.