Overwrote by mistake the /dev/mtd0 and /dev/mtd1 with wrong data

Hi, guys, i've overwritten /dev/mtd0 and /dev/mtd1 from my Buffalo WZR-HP-AG300H ( currently openwrt) by mistake. I overwrote the first 196608 bytes of /dev/mtd0 and 65536 bytes of /dev/mtd1.

The device is still running and i am sure it wont boot after restart. Will it be bricked after restart or will i be able to tftp a new image?
According to /proc/mtd, i overwrote spi0.0 and spi0.1, both partially. I really dont what they are. =(

dev: size erasesize name
mtd0: 01000000 00010000 "spi0.0"
mtd1: 01000000 00010000 "spi0.1"
mtd2: 00040000 00010000 "u-boot"
mtd3: 00010000 00010000 "u-boot-env"
mtd4: 00010000 00010000 "art"
mtd5: 01f90000 00010000 "firmware"
mtd6: 0011c3dd 00010000 "kernel"
mtd7: 01e73c23 00010000 "rootfs"
mtd8: 004f0000 00010000 "rootfs_data"
mtd9: 00010000 00010000 "user_property"

Replying my own thread:)
Well, after a few digging i've learnt that spi* are the raw devices. So, i had overwritten exactly 262144 bytes which is the size of the u-boot partition. Since i have another device, i saved the /dev/mtd2 (u-boot ) and restored on the one i had overwritten. After a reboot, IT IS ALIVE! :slight_smile:

1 Like

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