Question about recovery mode after mtd layout changes
TBBle opened this issue · 4 comments
Given #20 (comment), if f I can't find my old MTD backups (Hopefully archived somewhere) or can't find them on the 'net (can I extract it from the Qnap firmware download or LiveCD? I can see the 16MB image sent by tftp in the latter, I guess I can dd
out of the middle of that to get what I need?), am I correct in understanding I could still use network recovery to reflash the Qnap stock image? I see in the U-Boot_Config:
bootcmd=cp.l 0xf8100000 0x800000 0xc0000;cp.l 0xf8400000 0xb00000 0x300000;bootm 0x800000;echo Kernel_legacy layout fallback;bootm 0x900000
so I assume that means if it can't boot the kernel in (new) mtd1, it'll boot the kernel in (new) mtd3, i.e. the kernel flashed by the network recovery. I'm not sure how bootm fails though, so I might be reading too much into this and it will never actually fall back, or only falls back if I actually erase (new) mtd1 first or something.
If this fallback setup works, it seems that with a small-enough d-i image, i.e the one from buster, that would also be doable via network-recovery boot.
Or have I misunderstood something about u-boot and the network recovery? Does it always boot from the (new) mtd3 partition after flashing it, irrespective of uboot configuration? I also see this in the U-Boot_Config, which I guess is related?:
update=tftp 0x800000 uImage; tftp 0xa00000 rootfs.gz;bootm 0x800000
Oh, blast. I already went ahead and flashed the installer (using flashcp per #32), confirmed that it boots into d-i, and put the machine aside.
If I get a chance to boot the machine again before I pass it on, I'll extract the uboot config and share it, in case the next user hits issues. Otherwise I'll close this issue.
Okay, that makes sense. The hash-check explains how the fall-back can operate, thank you.