Increasing mamba and venom kernel partition to 6MB

sorry to bring this up again, but I just started wondering if I am wrong.

If I am, it means the the OpenWrt "factory" image is risky whether you use it from OEM or from another OpenWrt installation. The only safe way to install OpenWrt with a partition split different from the currently running system will then be to temporarily boot an initramfs with the new layout and sysupgrade from that.

The reason for my doubts is that I just got (a completely different) device with a bad block in the part of the flash I'd like to use for the kernel. Which means that the kernel partition shrinks by one block. The problem with the factory image is that it uses padding to put the UBI partition in the right flash address. This does not take bad blocks into account. OEM or OpenWrt does not know the difference between padding and other data in the image, and will write everythng linearly to flash, skipping the bad blocks. So instead of skipping some padding, we end up with one or more padding blocks in the beginning of the UBI partition. And a soft-bricked device unable to find any UBI image where it was supposed to be.

I sort of hope I'm wrong here....

(note that "it worked for me" doesn't prove anything unless you actually have a device with a bad block between the start of the kernel and the start of the ubi partitions)

1 Like

Probably you are not wrong about the bad blocks in kernel area (or padding before rootfs) causing problems with factory images.

The same issue has also been noticed with R7800 with bad blocks, and the initramfs approach is seen as the fix in those cases (and there is forum discussion about it.)

However, note that this issue has nothing do with the partition changes here, but with the "flash unified image without bad block handling logic" in general.

1 Like