[Solved] GL-S1300 Router only booting on OpenWrt Initramfs or factory QSDK firmware, OpenWrt squashfs installation not booting

Hello,

This is the first time I'm ever posting on a forum lol I'm usually good at searching very deeply everywhere and finding my answers but damn this one is difficult :sob: I need help !!!

It's been two days now that I've been struggling really really hard with my router... I have a GL-S1300 (Convexa-S) upon which I'm trying to install OpenWrt 22.03.5 which is at this date if I'm not mistaken, the latest version that I can get.

This isn't my first rodeo. I used to run OpenWrt 21.02.1 since I bought the router back in 2021 so I was already familiar with the process.

I firstly tried this :

Many, many times... because I know that it works. This is how I installed OpenWrt on my router the first time but this time for some obscure reason it wouldn't work. I went back and forth between the factory QSDK firmware and OpenWrt using "s1300-factory-to-openwrt.img" and "s1300-openwrt-to-factory.img". I also tried flashing back OpenWrt 21.02.1 instead of OpenWrt 22.03.5 to try and at least get that to run but every time and no matter the order I flashed the different img and bin files, I would only get to be able to get the factory firmware to work but never OpenWrt.

Meaning that after flashing the s1300-openwrt-to-factory.img and then the factory firmware, everything would boot and work, but when trying s1300-factory-to-openwrt.img and then OpenWrt, I would only get the non blinking "Power On" led indicator on the router and nothing else. No Wifi, No Ethernet either on 192.168.1.1 or 192.168.8.1, (not even ping) and no router config web page. The only page I'd be able to get would be the uBoot page on 192.168.1.1 when reflashing to go back to the factory firmware.

Then I tried the first steps described here :

I was getting the same non blinking "Power on" led indicator and nothing else...

Then I found this :

And I realized that the ".itb" file provided for OpenWrt 22.03.5 (Obtained here : https://downloads.openwrt.org/releases/22.03.5/targets/ipq40xx/generic/) is actually an initramfs partition that would enable me to run OpenWrt on RAM so I tried just that part and it worked !
Of course it's all running on RAM so the system is non-persistant but at least I can keep it running this way while looking for the actual solution.

My understanding based on reading the documentation is that the factory firmware runs on the eMMC 8GiB flash memory of the router but still uses NOR flash for bootloader while OpenWrt installs itself completely on the NOR 16MiB flash. The two ".img" transition files configure the bootloader to boot from one or the other.

So, given the fact that OpenWrt when installed in persistant mode wouldn't boot (or at least it looks like it) I'm wondering if there is maybe some kind of issue with the NOR mtd8 flash partition (https://openwrt.org/toh/gl.inet/gl.inet_gl-s1300?datasrt=firmware%20openwrt%20install%20url#flash_layout) do you think that makes sense or that it's even possible ? And if so how could I verify this and hopefully fix it ? Should I or is it possible to reformat that partition ?

I would like to note that uBoot worked nicely the whole time so there is some part of NOR that works...

Hopefully I was clear enough while providing any detail you might wonder about.

Funny a good night of sleep can change things...
I think formalizing my thoughts and posting everything here to get help from you guys actually also helped me pinpoint the issue.

Anyways it's solved !

I'm not 100% sure of exactly when the issue was solved but I can tell you what I did.

My thinking was that I needed to somehow properly clean the mtd8 partition mentioned earlier and rewrite the firmware to it and see what happens. I've been trying over and over again to flash OpenWrt to the NOR using the sysupgrade command so when I went back to the documentation I noticed that there was apparently another way to do it !

the "mtd write" command which seemed to be a more direct way to write onto partitions.

The documentation specifies that it should be used as " mtd write /tmp/xxx.abc linux " which I tried and did not work because "linux" here in the command refers to a partition that in my case did not exist.

A little more googling got me the the post #7 of this thread : https://forum.archive.openwrt.org/viewtopic.php?id=11393

so I realized that I needed to run the "cat /proc/mtd" command to list the mtd partitions and this is the output that I got :

dev: size erasesize name
mtd0: 00040000 00010000 "SBL1"
mtd1: 00020000 00010000 "MIBIB"
mtd2: 00060000 00010000 "QSEE"
mtd3: 00010000 00010000 "CDT"
mtd4: 00010000 00010000 "DDRPARAMS"
mtd5: 00010000 00010000 "APPSBLENV"
mtd6: 00080000 00010000 "APPSBL"
mtd7: 00010000 00010000 "ART"
mtd8: 00e80000 00010000 "firmware"

At that point it was clear that "linux" in the documentation for the GL-S1300 should be "firmware" instead. And it was actually also shown in the flash layout part of the documentation that I shared in the previous message.

I ran the command from my initramfs OpenWrt installation which worked, but I did it without the reboot part mentioned in the doc in order to check that things are ok before rebooting manually.

Once I rebooted I was able to access the login page of luci through 192.168.8.1 which honestly I find weird because this ip is the one that's used in the factory QSDK firmware. From what I know it should have been 192.168.1.1 so I don't know what did that. Also, I couldn't login whether using no password (OpenWrt default) or using the password that I set when using the factory firmware or OpenWrt previously (I was thinking that maybe the one I set using initramfs would work but this also does not make sense as the configuration should have been erased after the reboot if this is what I was booting from)

This is why I'm saying that I'm not exactly sure what solved my issue because at this point I did not know what my router had booted from.

Because I couldn't access the failsafe mode or properly reset whatever OpenWrt installation that seemed to be working at that point, I decided to flash the squashfs from uBoot which worked. After that I was able to access luci from 192.168.1.1 (honestly so many things happened I'm not 100% sure it was that ip but I think so), login with no password and then set my configuration.

So my conclusion is that maybe the mtd8 partition was in fact somehow corrupted and that the mtd write command helped me clear that out ? No idea... but it kinda looks like it. So if anybody sees this you have at least a very detailed account of how you might be able to solve your issues if something similar happens to you.

Cheers !

Quite informative article. Thanks.

-Gamma

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