Those errors say that the writes didn't happen successfully. The System Halt at first says that it couldn't find the preloader. The error on the installer says that it couldn't find the factory partition. In other words, it went very wrong but you didn't spot and report any errors.
Let's try this once more, but this time without the variables that might have been corrupted and with using clean files where possible.
From the OpenWRT firmware selector, we need all four of the following files for the Linksys E8450 UBI version 23.05.3:
- PRELOADER.BIN
- BL31-UBOOT.FIP
- KERNEL
- SYSUPGRADE
From your backups, we need the file:
Follow the initial steps as before, starting with mtk_uartboot to get into the U-Boot console. From there:
loadx 0x48000000 115200 && mtd erase bl2 && mtd write spi-nand0 0x48000000 0x0 0x20000 && mtd write spi-nand0 0x48000000 0x20000 0x20000 && mtd write spi-nand0 0x48000000 0x40000 0x20000 && mtd write spi-nand0 0x48000000 0x60000 0x20000
At this time, you will send the file you downloaded as the 'PRELOADER.BIN' file using the xmodem protocol. If you didn't change the filename, it should be called openwrt-23.05.3-mediatek-mt7622-linksys_e8450-ubi-preloader.bin.
When the upload completes and you return to the terminal, you should see that it has written the file to a total of four places. An example of what you should see is below.
Erasing 0x00000000 ... 0x0007ffff (4 eraseblock(s))
Writing 131072 byte(s) (64 page(s)) at offset 0x00000000
Writing 131072 byte(s) (64 page(s)) at offset 0x00020000
Writing 131072 byte(s) (64 page(s)) at offset 0x00040000
Writing 131072 byte(s) (64 page(s)) at offset 0x00060000
If you do not see confirmation, then something has probably gone wrong and it needs to be addressed.
--
With the preloader written, we can continue on with the fip. Issue the below command:
loadx $loadaddr 115200 && mtd erase fip && mtd write fip $loadaddr
Now, you will upload the 'BL31-UBOOT.FIP' file via xmodem. If you haven't changed the filename, it should be openwrt-23.05.3-mediatek-mt7622-linksys_e8450-ubi-bl31-uboot.fip
When the upload completes and you return to the terminal, you should see confirmation of the erasure and writing. The below is an example:
Erasing 0x00000000 ... 0x0013ffff (10 eraseblock(s))
Writing 1310720 byte(s) (640 page(s)) at offset 0x00000000
If you do not see this confirmation, then something has gone wrong and we need to see the error to identify the issue.
--
If the two above sets of commands succeeded, now we will write the factory partition. Here is where we need your backed up mtd2.bin file.
loadx $loadaddr 115200 && mtd erase factory && mtd write factory $loadaddr
Now, upload your backed up mtd2.bin file via xmodem. When it completes, you should again see similar confirmation lines indicating that it has erased a section of flash and then written the content.
--
For this next step, we will install the new OpenWRT recovery environment.
setenv replacevol 1; loadx $loadaddr 115200 && iminfo $loadaddr && ubi part ubi && run ubi_write_recovery; setenv replacevol;
Now, upload the 'KERNEL' file via xmodem. If you didn't change the filename, it should be openwrt-23.05.3-mediatek-mt7622-linksys_e8450-ubi-initramfs-recovery.itb
Upon success, the router will boot into the newly installed recovery environment when reset
. From there, all you need to do is install the sysupgrade file via your preferred method (luci, command line, etc.).