Device stuck in INITRAMFS mode (Zyxel GS1900-8 V2/B1)

So, I probably flashed the OpenWRT kernel image to the wrong partition.

The problem is, I am unable to recover from it, neither by following the installation guide or by doing SYSUPGRADE.

These are some errors I've experienced while trying to follow the guide from https://openwrt.org/toh/zyxel/gs1900-8

root@OpenWrt:/tmp# fw_setenv bootpartition 0
Warning: Bad CRC, using default environment
Can't open /dev/mtd1: Permission denied
Error: can't write fw_env to flash
root@OpenWrt:/tmp# ping 1.1.1.1
PING 1.1.1.1 (1.1.1.1): 56 data bytes
64 bytes from 1.1.1.1: seq=0 ttl=53 time=27.194 ms
^C
--- 1.1.1.1 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 27.194/27.194/27.194 ms
root@OpenWrt:/tmp# wget "https://downloads.openwrt.org/releases/24.10.0/targets/realtek/rtl838x/openwrt-24.10.0-realtek-rtl838x-zyxel_gs1900-8-squashfs-sysupgrade.bin"
Downloading 'https://downloads.openwrt.org/releases/24.10.0/targets/realtek/rtl838x/openwrt-24.10.0-realtek-rtl838x-zyxel_gs1900-8-squashfs-sysupgrade.bin'
Failed to send request: Operation not permitted

Trying to update the package list also results with an error Failed to download the package list from [...]

sysupgrade it with sysupgrade file?

Or perhaps install and load kmod_mtd_rw.

1 Like

Did you read this section of the ToH entry you linked? You clearly did not edit /etc/fw_env.config to point to the /dev/mtd2 partition.

Follow the instructions precisely, that is: Run fw_printenv and if that doesn't provide your U-Boot environment, STOP there.

1 Like

Hmm... I haven't noticed those instructions before. Although they should work, it all seems a bit more complicated than necessary. We have been creating separate config files for the mtd1 and mtd2 environment partitions by default for the last 4 years:

root@gs1900-10hp-f:~# cat /etc/fw_env.config 
/dev/mtd1 0x0 0x400 0x10000 
root@gs1900-10hp-f:~# cat /etc/fw_sys.config 
/dev/mtd2 0x0 0x1000 0x10000

The fw_sys.config file is used by the fw_printsys/fw_setsys "tools". Which are simple shell wrappers around fw_printenv/fw_setenv adding -c /etc/fw_sys.config to the command line.

So you should be able to do

fw_setsys bootpartition 0
fw_printsys bootpartition

without editing any config file at all. It's already there.

2 Likes

Ah, I missed that OP typed fw_setenv instead of fw_setsys! Great, I didn't know that there were two config files. Thanks for the explanation @bmork.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.