I'd remark some erreors messages in 'dmesg' when booting Debian Squeeze on my plug.
[ 172.572294] uncorrectable error :
[ 172.575545] end_request: I/O error, dev mtdblock0, sector 0
[ 172.581325] Buffer I/O error on device mtdblock0, logical block 0
[ 172.587883] uncorrectable error :
[ 172.591134] end_request: I/O error, dev mtdblock0, sector 8
[ 172.596915] Buffer I/O error on device mtdblock0, logical block 1
[ 172.603855] uncorrectable error :
[ 172.607101] end_request: I/O error, dev mtdblock0, sector 16
[ 172.612969] Buffer I/O error on device mtdblock0, logical block 2
[ 172.619626] uncorrectable error :
[ 172.622896] end_request: I/O error, dev mtdblock0, sector 24
[ 172.628769] Buffer I/O error on device mtdblock0, logical block 3
[ 172.635427] uncorrectable error :
[ 172.638676] end_request: I/O error, dev mtdblock0, sector 0
[ 172.644456] Buffer I/O error on device mtdblock0, logical block 0
So I try from OS level to have access into /dev/mtdblock0 and I receive an error.
root@sheeva-nand:~# hd -n 256 /dev/mtdblock0
hd: /dev/mtdblock0: Input/output error
root@sheeva-nand:~#
This action generate other error messages in 'dmesg'.
I can access /dev/mtblock1 and 2 without any problem
root@sheeva-nand:~# hd -n 256 /dev/mtdblock1
00000000 55 42 49 23 01 00 00 00 00 00 00 00 00 00 00 07 |UBI#............|
00000010 00 00 02 00 00 00 08 00 00 00 00 00 00 00 00 00 |................|
00000020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
00000030 00 00 00 00 00 00 00 00 00 00 00 00 92 84 9c e2 |................|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000100
My partitions are difined as this :
mtdparts=orion_nand:0x400000@0x100000(uImage),0x1ef00000@0x500000(rootfs),0xc00000@0x1f400000(debian)
'uImage' and 'rootfs' are standard partition for sheeva and le small last 'debian' (12Mo) contain uImage and uInitrd for Debian on usb disk (/dev/sda2).
so mtd reported correctly as this
root@sheeva-nand:~# cat /proc/mtd
dev: size erasesize name
mtd0: 00400000 00020000 "uImage"
mtd1: 1ef00000 00020000 "rootfs"
mtd2: 00c00000 00020000 "debian"
Is there a special attribute for mtd0 ?
because devices seem to have the sames
root@sheeva-nand:~# ls -l /dev/mtdb*
brw-rw---- 1 root disk 31, 0 Sep 3 11:48 /dev/mtdblock0
brw-rw---- 1 root disk 31, 1 Sep 3 11:48 /dev/mtdblock1
brw-rw---- 1 root disk 31, 2 Sep 3 11:48 /dev/mtdblock2
I don't get any error with character devices, I can make "cat /dev/mtd0" or "cat /dev/mtd0ro" and the content seem to be really uImage ....