Topic: [solved] [ramips 7620a] "mtd" command cannot open /dev/mtd2
This is the flash partition table created for my set.
root@OpenWrt:/# cat /proc/mtd
dev: size erasesize name
mtd0: 00030000 00010000 "u-boot"
mtd1: 00010000 00010000 "u-boot-env"
mtd2: 00010000 00010000 "factory"
mtd3: 007b0000 00010000 "firmware"
mtd4: 006b3cf9 00010000 "rootfs"
mtd5: 003f0000 00010000 "rootfs_data"
I m trying to modify the data in mtd2.
i have tried :
mtd erase /dev/mtd2
mtd erase /dev/mtdblock2
dd if=/dev/zero of=/dev/mtd2 bs=1 seek=0 count=1024
but all failed.
mtd command complained : Could not open mtd device: /dev/mtd2
dd command complained : dd: can't open '/dev/mtd2': Permission denied
I tried those commands on /dev/mtd5, all of them work properly.
What's wrong with /dev/mtd2?