Afterwards i have to create a VLAN and flash again. So my question is, if I can't get the VLAN working und do a reboot, the ZyXEL GS1900-8 is the same as before loading the bin-file and I could not do anything wrong?
I have a Linux notebook and have no idea how I can setup a VLAN with it. But I have a
TP-Link TL-WR1043ND running v21-rc, which could be used.
If I can't get it work with this VLAN-configuration, I could use tftp and a serial cable. Is there somewhere a detailed explanation? I know only:
rtk network on
I never used a serial cable. I can open with my Linux PC a terminal-window, but then I have no idea how to go on.
Nothing is broken. But the switch will be set to boot from the OpenWrt initramfs image after the initial flash from OEM. You can only change back to OEM by using either booloader (using console) or OpenWrt (ssh to 192.168.1.1 over vlan 100 on port 1).
There are very (maybe too?) detailed instructions in the wiki docs
What you need to do is simply:
connect TX, RX and GND according to the pinout documented on the device page. Do not connect 3.3V (VCC)
open the USB tty device with a terminal emulator like minicom or picocom and set the speed as specified in the device page
power on the switch and watch it boot. if there is no output, then switch the TX and RX and try again (it's hard to get thos right since you connect TX on one side to RX on the other and vice versa)
press either Escape (on Netgear etc) or Space (on ZyXEL etc) to stop at the bootloader prompt
Now you can either switch back to OEM (if you flashed OEM to the second firmare partition and OpenWrt to the first) by doing
or more complicated stuff like tftpboot from memory by doing
rtk network on
tftpboot 0x84f00000 openwrt-initframfs.bin
assuming you have a tftp server running on 192.168.1.111, serving openwrt-initframfs.bin and connected to one of the switch ports. No VLANs involved.
Or you can also just let the switch boot to the OpenWrt prompt and configure it from there.
This is getting much too long and complicated now.... Basically: You cannot do anything WRONG. There are a multitude of options and possible solutions. Describing them all just makes this look more complicated than necessary.
First, change the VLAN from 2 to 100 for the wan port on the TL-WR1043ND. Next, change the lan IP of the TL-WR1043ND from 192.168.1.1 to 192.168.2.1 .Then you can talk to the ZyXEL GS1900-8 at 192.168.1.1 on vlan100.
The magic word here is flash the initramfs image (and I would add, to the first partition set), something one would usually never do - in order to then boot into this flashed initramfs image, before sysupgrading to the proper OpenWrt sysupgrade image.
This slightly uncommon two-step procedure is done to coax the OEM upgrader into accepting the OpenWrt image (as it is also done on selected other devices, e.g. map-ac2200 or rt-58u).
The more straight forward approach would be to hook up the serial console, interrupt u-boot, enable the network, select booting from the first partition and tftpboot/ bootm the initramfs image and to then flash the sysupgrade image from the RAM-booted initramfs image, but users often have reservations against using the serial console (although the gs1900 family makes it easy, three standard head philips PH1 screws, pre-populated and marked 2.54mm pitch/ 3.3V header and a cooperative u-boot).
About the naming, this really is the normal initramfs image, which is abused to defeat the OEM upgrader.
Yes, using the first partition for OpenWrt is good advice.
The initramfs will work from any of the partitions, but the sysupgrade will always use and overwrite the first one. I'm not sure it will adjust the bootpartition variable, though? So you may end up booting the initramfs again if you installed it in the second partition.
In any case, you can save the second partition for OEM firmware by making sure the initramfs is flashed to the first one. You'll obviously have to install the OEM firmware in the second partition if you want this. Doing that before installing OpenWrt is easiest. The OEM firmware GUIs I've used (ZyXEL and Netgear) allow direct partition selection both for flashing and boot default. So there are no tricks involved. Just select the second one for your OEM image and the first one for the OpenWrt initramfs, and then set OpenWrt to be booted by default.
This is what has happened to me.
I flashed the initramfs in the Zyxel webui without making sure the first partition was selected. Once Openwrt booted I tried flashing squashfs without any errors.
Any changes made are discarded on reboot so I assume initramfs is on partition 2.
I have tried listing/switching partitions with /usr/sbin/fw_printenv -n boot_part with no luck. The error reads something like boot_part not classified.
So how do I get myself out of this situation?
How do I get openwrt squashfs on partition 1 and ideally zyxel fw on partition 2?
Any pointers are greatly appreciated.
Don't worry if some of those variables are missing. The important part is to see if you have bootpartition set to 0 or 1. If it's not there, then that's the equivalent to 0.
If it is set to 1, then you could try to change it to 0 using
fw_setenv -c /tmp/fw_sys.config bootpartition 0
But this will probably fail due to /dev/mtd2 being read-only (unless your initramfs i a recent image built from master). If so, then you have to try again after installing kmod-mtd-rw (hoping you do have an initramfs where this is an option...):
DO NOTE the name of that parameter! It's not a joke. Be really careful and think twice after loading that module. It makes all your partitions writable, including the bootloader. There is no safety net when this is module is loaded. But it is a really useful tool for these situations.
Thanks bmork for your speedy, calming, extensive and helpful response!
It is very much appreciated.
I'm happily running Openwrt 19.07 on two other devices on my network and the GS1900-8 is the most recent addition. Backups before and after making any changes has saved me many times unfortunately I got complacent and didnt do the required research before flashing the GS1900-8. The comupter gods showed mercy... this time...
Any how The image used was rc3 and
did the trick.
If its not to much to ask and not considered post-jacking how would one go about flashing the ZYXEL firmware to partition 2?
first thanks everybody for the great work on these devices. Hopefully the bigger models will be also supported some day.
But I have a question. Is it possible to use a port of the GS1900-8 as a WAN port with pppoe? I was trying to set it up but in 21.02 there seems to be no pppoe installed and if I want to install it, kmod-pppoe is missing.