Hi. I installed OpenWrt on my Zyxel GS1900-24E switch today out of curiosity. I am out of my technical depth and can't get the GUI to work, unless I change the IP address of my router.
In short I would really like to get the switch back to the factory firmware. I've seen a few references to it, but are there any fairly easy instructions on how to safely do this please?
Thank you so much for the reply! My router IP is 192.168.1.1. OpenWrt seems to want to force my switch to use that. I tried disabling DHCP on the LAN interface in OpenWrt and setting a static IP, but it doesn't seem to have worked.
Thanks. I cannot seem to access the switch with OpenWrt now. I set a static IP to .221 but when I use that to access the GUI, I just get an arrow on the browser page then it times out. Apologies for being such a noddy!
Is there a way I can revert the switch to the default firmware at all? I'm rather out of my depth I'm afraid.
Thanks. I have tried a factory reset (holding button for more 10 seconds) but nothing happens. If i then turn off and on again, it restarts still with OpenWrt.
It must be internal as there is no serial port on the outside.
The device is dual boot, with OpenWrt on partition 1. Partition 2 will still have the factory firmware on. I'm seeing if I can somehow get the switch to boot from that, giving me OEM again.
You have to distinguish between bootloader and its idea of the partitioning, which is -using the OEM (or old OpenWrt, <=23.05.x) firmware- an a/b dual-firmware setup (without automatic failover) - and the actual usage of the running firmware.
OpenWrt barely fits into 6'976 KB anymore (24.10.x technically still does, but barely, future versions won't), so the way out is merging both slots into one (giving you 13'952 KB). The way this works, is configuring the bootloader to use the first firmware slot (a), but from there on the kernel/ rootfs/ overlay goes beyond the limits of its intended slot into the b slot. This is a tad unclean, but works out fine, as there is no automated failover switching by the bootloader - as long as you don't manually reconfigure it to boot from the b-slot (as there isn't anything bootable at the expected location, just random data from rootfs/ overlay). tl;dr: leave the bootloader alone, don't even think about reconfiguring it for the second-/ b-slot.
It's possible, but not necessarily trivial. At the very least it requires a two step process.
Disclaimer: I do use several gs1900 devices, but I haven't tried reverting the merged-firmware to OEM myself, so the following is academic and untested! Yes, I did test going back and forth before, several times, but under distinctively different circumstances, as I:
had serial console access (you really want that, when testing potentially harmful things)
had full backups of all partitions from the untouched switch in vanilla OEM state
tested this long time ago, before the merged partitions
...and in the worst case, I would have spi-nor flasher, soic-8 clamps and soldering iron at hand, so I could recover 'anything', if push comes to shove
so a quite different starting position.
The below is just an untested high-level overview of what could -probably- be done, serial console access (and flash backups) strongly recommended(!):
first you need to revert to the dual-partition scheme, namely <= 23.05.x, by reversing the upgrade information for 23.05.x --> 24.10.x
I would do this by tftpbooting the 23.05.x initramfs image via serial console
but it would probably also be possible to force-sysupgrade the 23.05.x initramfs image
boot into 23.05.x, with its split partitioning scheme, make sure that everything works
now you need to fix/ reflash the (now existing again) second b-partition slot with the OEM firmware
I would do this by simply rewriting my backups, I took before touching my device
if you don't have full backups of everything (all mtds), at least take them now!!!
if you don't have a backup, you must check first how to do this (careful checking the OEM firmware structure/ size of how to write it back (mtd?))
toggle the boot order and hope for the best...
I strongly recommend to have (and use) a 3.3V(!) usb2serial adapter at hand! I have never checked the OEM firmware format (if it can be written back by mtd or if changes are required before), because I had my own backups and didn't need to bother about that question. You do want to get a second opinion/ confirmation about the process from someone who has done it this way before. And you want a safety net (serial, spi-nor writer, etc.), don't try to attempt any of this unless you completely understand each step, down to the details and triple check everything - you have one chance and a considerable chance to mess up!
My suggestion would be to first get OpenWrt working as you originally wanted, this is:
easier
less risky
buys you time to investigate the process and get a second opinion
Hi slh. Thank you so much for such a detailed and through set of instructions! That is very kind of you to take the time out to write this. Great warning advice too! I won't rush into it, but this does sound like a (well rested!) Sunday project at some point. The unit I have doesn't have an external serial port, though I believe there is an internal one (some more reading for me to do). I'll take the backups and do some more reading on each of the steps.
The GS1900-24E like most of the Zyxel switches has a populated 4-pin serial connector. It can be seen on the image available at https://svanheule.net/switches/gs1900-24e. Some of the Zyxel switches make this easily available through the vents in the case, but I don't believe this is the case with the GS1900-24E.