Error creating FAT32 over Nand flash
Ivan Li
lijinlei1 at 163.com
Tue Aug 25 09:35:23 EDT 2009
Hi guys,
I have some problems with creating FAT32 fs over nand flash.
I created FAT32 fs over nand flash with below command:
> flash_eraseall /dev/mtdblock6
> mkdosfs -v -F 32 /dev/mtdblock6
mkdosfs 3.0.2 (28 Feb 2009)
unable to get drive geometry, using default 255/63
/dev/mtdblock6 has 255 heads and 63 sectors per track,
logical sector size is 512,
using 0xf8 media descriptor, with 638976 sectors;
file system has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 623 sectors, and provides 79712 clusters.
with USB mass storage gadget I exported this FAT partition to WinXP. When I tried to copy some files into it, I got errors both on WinXP and Linux console:
In WinXP I got an error dialog, say "Can't copy ****, data error (CRC error).
In serial console I got:
end_request: I/O error, dev mtdblock6, sector 77584
end_request: I/O error, dev mtdblock6, sector 77568
Buffer I/O error on device mtdblock6, logical block 9696
lost page write due to I/O error on mtdblock6
end_request: I/O error, dev mtdblock6, sector 77576
Buffer I/O error on device mtdblock6, logical block 9697
lost page write due to I/O error on mtdblock6
I don't know if FAT32 can't handle bad blocks correctly, or something else.
Any ideas?
The Nand Flash I am using is Samsung K9F4G08U0A, (512M = 4096 blocks, 1 block = 64 pages, 1 page = 2048 bytes, spare area = 64 bytes.)
Kernel configuration:
CONFIG_BLOCK, CONFIG_MTD, CONFIG_MTD_PARTITIONS, CONFIG_MTD_CHAR, CONFIG_MTD_BLKDEVS, CONFIG_MTD_BLOCK, CONFIG_MTD_NAND...
Thanks in advance.
Ivan
More information about the linux-mtd
mailing list