EdgeRouter X (ER-X) - Backing up Stock

Taking off from my last question, I see this explanation of how to back up the ER-X stock, but it's not giving me a lot of confidence as it's using dd rather than nanddump. Is this right?

Also, do I need more than the bootloader (mtd2)? If I were to restore that, wouldn't I be able to download stock from the Ubiquiti website and reinstall?

But wait, if the bootloader is munged, how would I be able to restore that??

That is indeed problematic on NAND flash, as dd would also back up the old in-band ECC data, which would be (very) problematic when restoring it months/ years later; nanddump would be the way to go (there might be exceptions for very early boot partitions, like bootloader itself and eventually calibration data (does not apply to this particular device), but that's hard to guess without checking the model in question).

It's always good have more backed up than you need, doesn't mean you should restore it blindly (again, details are model specific).

On NAND, a broken bootloader tends to be fatal. While SPI-NOR can be reflashed externally relatively easily, NAND usually can't (flashers are considerably more expensive, the flash chips much harder to desolder (more pins, different packaging), and ECC being very specific to the device in question, so no generic way to just restore the whole lot).

Disclaimer: I don't own this particular model, nor anything else with that SOC or from that vendor, so I'll have to keep the answer generic.

2 Likes

If you have the new bootloader with automated TFTP recovery, it will be very easy to restore to stock using their recovery image. There's no need to backup the stock firmware.

2 Likes

See: https://help.ui.com/hc/en-us/articles/360009932554-EdgeRouter-How-to-Update-the-Bootloader

n.b. be sure to upgrade the boot loader to version 2 or later after you have upgraded the stock firmware to v1.10.10 or later, or v2.0.4 or later.

1 Like

Would I need to flash to stock, update the boot loader and then flash back to openwrt?

Yes. The boot loader update comes with the stock firmware upgrades, but does not automatically install. IOW you need to manually install the boot loader upgrade from stock.

1 Like

And since according to @slh , there's no way to repair/ rewrite a fracked bootloader on NAND, it seems to me there's no point in taking a backup at all. I should just DL and save the firmware from Ubiquiti, and leave it at that.