I am aware of my router disk failing, and it's getting worse - it seems to be hard finding a suitable replacement.
So, I had this idea that I could boot OpenWRT from a USB disk instead.
Now to do this, it may involve some hacking to the boot loader. To be able to use USB as storage, I'd have to have the kernel modules present at boot to mount the disk, or is there a way I can just tell the kernel to boot straight from USB?
Any help appreciated!
You will be mostly on your own, but this could only work (and not easily), if ZyXEL compiled their OEM bootloader (u-boot) with USB support (possible, not very likely, but I don't know either). So whip out your serial console access and check the options u-boot gives you.
Custom(ized) hardware will also mean custom software, meaning you will have to (keep-) patch(ing) OpenWrt for the changed environment, if you get it to work somehow.
Yeah, I'm kinda stumped really.
The other idea was to move the partition away from the faulty areas of the disk. I got 4GB on this router, only using stock partition layout.
How did you damage the flash in the first place? eMMC should be rather resilient and has its own internal error correction and bad block remapping, it would need quite active writes to kill that (I've flashed mine a few hundred times and it's still fine after five years of daily service).
I've no idea, all I know is if I have a problem with it rebooting.
I thought the problem was random at first, but it seems to be when reading certain files on the disk causes the whole thing to reboot.
It's nothing to do with filesystem at all, because I used dd to dump an image of the flash over ssh (in recovery mode), and it kept hanging - but this method of backing up used to work.
I would have expected the kernel to give me a message or to handle it gracefully, but there's nothing.
EDIT: badblocks crashes too