Why netflash looked like it bricked my Tripp Lite B093: the -C flag only compares
I blamed the B093's firmware upgrade tool for wiping the image slot and failing to write it. It hadn't written anything. Every run I had on record used -C, which only compares. Without it, the stock tool upgrades, downgrades and cross-flashes the unit, from SSH or the web UI.
The first version of my B093 project page said that netflash, the tool behind the web UI upgrade, zero-touch provisioning and central “node upgrade”, erased the image slot and then failed to write it. That was wrong. The tool was fine. I was holding it wrong, and the way I was holding it is worth explaining, because the flag that caused it sounds like a safety feature.
The symptom
Every netflash run I had on record printed check failed lines and left the unit on the firmware it started with. Read back, the target slot didn’t match the new image. It looked like a tool that erased flash and then couldn’t write it.
The cause: -C means compare only
Every one of those runs used -C. Its help text says it checks that the image was written correctly, so it sounds like a flag you’d always want. In the source, -C makes netflash compare only: it checks each block against the new image instead of erasing and writing it. The check failed lines I took for a failed write were just a list of where the slot differed from the new image.
So nothing had been written at all. That also explains why resets and power cycles always “went back to Tripp Lite” back then: the image slot still held Tripp Lite firmware.
The fix: run it without -C
Without -C, netflash works. On the lab unit it has now:
- Upgraded the running image in place, and come back on its own in about two and a half minutes with the config kept.
- Downgraded the unit back to Tripp Lite firmware.
- Starting from Tripp Lite firmware, used Tripp Lite’s own
netflash(-k -H -i) to cross-flash to Opengear over SSH. The unit rebooted by itself and came back on Opengear in about six minutes, config kept, with no serial needed. - Done the same from the web UI on both firmwares, which passes the “Firmware Options” field straight through to
netflash. Starting from Tripp Lite firmware, the Tripp Lite web UI with-H -icross-flashed the unit to Opengear in about three and a half minutes, with no serial needed.
Every write was checked by comparing a hash of the image slot with the firmware file minus its short version trailer (which netflash strips before writing), and by checking that UBI reported no corrupted blocks.
What the flags mean in practice
- Never use
-Cunless you only want a comparison. -Eerases the configuration before writing. On a web UI downgrade to Tripp Lite firmware it came back on factory settings with new SSH host keys, which is what you want when going back. The URL/zero-touch upgrade wrappers pass it by default, so watch for it there.-Hand-iskip the hardware and version checks that would otherwise refuse a cross-brand image. They’re the reason the cross-flash works, and also the reason you need to be sure you have the right file.
What’s still unexplained
I still don’t know what actually wiped the image slot in October, when the unit needed recovering over serial. It wasn’t the -C runs.
And one unit is not a fleet. A handful of successful runs on a lab unit with a serial cable attached says the stock path can work, not that it’s safe to run on a box nobody can reach. What a failed write leaves you with, and how to get back, is the next part.