Bootloop on R6350 OpenWrt install

Hello,
I am having difficulties installing OpenWRT on Netgear R6350. So far I have tried to install both Snapshot and version 19.07.2 through web gui and also both through telnet. Every time the router ends up bootlooping, flashing first all 4 leds, then first led (power), second led (internet), and last first led again, then it just repeats.

Through web gui installation, when trying to install openwrt, it starts bootlooping before the installation is finished, I guess about the same time when upgrading stock firmware would reboot once. I am able to restore the router with nmrpflash. I am also able to upgrade stock firmware from older stock firmware. Any ideas what is causing this bootlooping?

Downgrading and upgrading with stock firmware from stock firmware is working. I am baffled why does OpenWRT not work, I am new to all of this. Please tell me what kind of information I can provide which would help me get openwrt up and running. I pretty much only bought this device to run OpenWRT on.
I notices the flash layout is a little different than what https://openwrt.org/toh/netgear/netgear_r6350 shows
my device's mtd layout:

dev:    size   erasesize  name
mtd0: 00100000 00020000 "Bootloader"
mtd1: 00100000 00020000 "SC_PART_MAP"
mtd2: 00420000 00020000 "Kernel"
mtd3: 02800000 00020000 "Rootfs"
mtd4: 00200000 00020000 "English UI"
mtd5: 00200000 00020000 "ML1"
mtd6: 00200000 00020000 "ML2"
mtd7: 00200000 00020000 "ML3"
mtd8: 00200000 00020000 "ML4"
mtd9: 00200000 00020000 "ML5"
mtd10: 00200000 00020000 "ML6"
mtd11: 00200000 00020000 "ML7"
mtd12: 00200000 00020000 "ML8"
mtd13: 00200000 00020000 "ML9"
mtd14: 00200000 00020000 "ML10"
mtd15: 00200000 00020000 "ML11"
mtd16: 00200000 00020000 "Factory"
mtd17: 00200000 00020000 "SC Private Data"
mtd18: 00200000 00020000 "POT"
mtd19: 00200000 00020000 "Traffic Meter"
mtd20: 00200000 00020000 "SC PID"
mtd21: 00200000 00020000 "SC Nvram"
mtd22: 00200000 00020000 "Ralink Nvram"
mtd23: 00200000 00020000 "Reserved Block1"
mtd24: 00200000 00020000 "Reserved Block2"
mtd25: 00200000 00020000 "Reserved Block3"
mtd26: 00200000 00020000 "Reserved Block4"
mtd27: 00200000 00020000 "Reserved Block5"
mtd28: 02160000 00020000 "Reserved Block6"

Your router seems to have a bad flash block in the kernel partition. This is compensated by the manufacturer by enlarging partitions that have bad flash blocks. However, OpenWrt does not yet use the partition table that is stored in the flash (it uses fixed partition offsets instead).

I have sent a patch for making use of the partition table to the mailing list, but it still needs testing. Could you compile your own image using that patch to check whether it helps?

That patch should fix the partition table in OpenWrt. I am not sure though if this patch is enough to make your router work, as the bad block is already in the kernel partition. The patch is only going to help if the issue is the kernel not finding the root file system, it won't help if the kernel itself does not load successfully.

2 Likes

I too have an R6350 so I'm wondering if this fix did the trick. There is still a warning on the device page about bootloop/softbrick.

Hi @janh,

I have sent you an email but just realised you are also on here on the forums.

Your patch is working with a couple of beeline devices as well as mine (Sercomm S3) which I can confirm was tested with devices with bad blocks that did not boot without the patch.

Adrian (openwrt reviewer) asked if the patch can be sent upstream. You can find the discussion here

2 Likes

As you may know from the mailing list archives, the suggestion to upstream this patch isn't new. And I agree it would be good to get the partition parser merged.

However, I am currently not working on that, and I have no plans to do so at the moment.

If you want to get this upstreamed in the near future, you should work on that yourselves. Another user also mentioned interest in working on it here, so you could also contact them for help.