OpenWrt Forum Archive

Topic: i/o error on mtdblock0 and mtdblock4, is it the uboot partition?

The content of this topic has been archived on 5 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi all,

Recently on my netgear wndr4300, I started getting the following errors and the 5G radio stopped working...

[   10.320000] end_request: I/O error, dev mtdblock0, sector 128
[   10.320000] Buffer I/O error on device mtdblock0, logical block 16
[   10.330000] end_request: I/O error, dev mtdblock0, sector 128
[   10.330000] Buffer I/O error on device mtdblock0, logical block 16
[   10.470000] end_request: I/O error, dev mtdblock4, sector 72
[   10.470000] Buffer I/O error on device mtdblock4, logical block 9
[   10.490000] end_request: I/O error, dev mtdblock4, sector 128
[   10.490000] Buffer I/O error on device mtdblock4, logical block 16

The errors don't appear continuously but only at bootup.
I thought there could be some corruption with the firmware so I thought to update to the latest openwrt.

However, as per /proc/mtd, mtd0 is uboot and mtd4 is language partition.
root@OpenWrt:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00040000 00020000 "u-boot"
mtd1: 00040000 00020000 "u-boot-env"
mtd2: 00040000 00020000 "caldata"
mtd3: 00080000 00020000 "pot"
mtd4: 00200000 00020000 "language"
mtd5: 00080000 00020000 "config"
mtd6: 00300000 00020000 "traffic_meter"
mtd7: 00200000 00020000 "kernel"
mtd8: 01700000 00020000 "ubi"
mtd9: 01900000 00020000 "firmware"
mtd10: 00040000 00020000 "caldata_backup"
mtd11: 06000000 00020000 "reserved"

I had some old md5s of all the partitions and comparing them with the current, everything was fine. That means uboot, caldata, pot etc. were intact i.e. no corruption.
However, I found one thing, when I tried to do a md5sum on /dev/mtdblock0, it gave an error but an md5sum on mtd0 was fine and matching with my backup.

Isn't mtdblock0 is same as mtd0 and maps to same nand region, just that former is a block device representation and later is a character special device?

Anyways, I flashed the latest trunk openwrt and I still have the same errors...
[   10.586148] mount_root: loading kmods from internal overlay
[   10.786386] blk_update_request: I/O error, dev mtdblock0, sector 128
[   10.794196] blk_update_request: I/O error, dev mtdblock0, sector 128
[   10.800650] Buffer I/O error on dev mtdblock0, logical block 16, async page read
[   10.876562] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 5 is up
[   10.948745] blk_update_request: I/O error, dev mtdblock4, sector 72
[   10.961649] blk_update_request: I/O error, dev mtdblock4, sector 128
[   10.969513] blk_update_request: I/O error, dev mtdblock4, sector 128
[   10.975964] Buffer I/O error on dev mtdblock4, logical block 16, async page read
[   11.136796] UBIFS (ubi0:1): background thread "ubifs_bgt0_1" started, PID 485
[   11.261496] UBIFS (ubi0:1): recovery needed
[   11.472243] UBIFS (ubi0:1): recovery completed
[   11.476865] UBIFS (ubi0:1): UBIFS: mounted UBI device 0, volume 1, name "rootfs_data"
[   11.484814] UBIFS (ubi0:1): LEB size: 126976 bytes (124 KiB), min./max. I/O unit sizes: 2048 bytes/2048 bytes
[   11.494896] UBIFS (ubi0:1): FS size: 12189696 bytes (11 MiB, 96 LEBs), journal size 1015809 bytes (0 MiB, 6 LEBs)

So the IO errors are exactly with the same device, blocks and sectors. Again the errors are only during bootup.
My 5G radio is now working and everything else seems to be working but these errors are annoying and I'm wondering what is really corrupted.

Is it uboot and language partitions that have bad sectors. If yes, then why the md5sum was fine?
Is it firmware/rom partition but then why it is reported as mtdblock0 and mtdblock4?

Please help.

Thanks,
- Kamal N

Anybody please???

Can anybody help here please?

Run badblocks on all mtds several times.
Looks like flash got broken. Did you write a lot to it ? May be constantly updating logs were there ?
I see its not about u-boot but can be related to other broken region

(Last edited by bolvan on 29 Feb 2016, 15:46)

At least some reply. Thank you.

I don't have many writes on the nand, in fact the firmware upgrade was after an year.
My /var and /tmp are mounted on tmpfs so I believe that should not write to nand either.

But what is mtdblock0 and mtdblock4? They don't seem to be uboot or language partitions as error comes near mounting rootfs (guess) but then shouldn't it be mtdblock8/9 because that is what /rom is.

The discussion might have continued from here.