LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   How to force bad blocks into CF in order to decrease the capacity (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/how-to-force-bad-blocks-into-cf-in-order-to-decrease-the-capacity-829465/)

asca 08-31-2010 02:55 AM

How to force bad blocks into CF in order to decrease the capacity
 
Hello,
I have to prepare a Master CF suitable for multiple CF duplication by using a stand alone CF duplicator (IMI M6500). The problem I'm encountering is that despite I'm using the same CF both for Master and for Copies (Kingston CF x133 8GB-2S), the real size of CF changes with the lot #. In example I have found a lot# with 7637MB and another with 7272MB. Since the CF duplicator performs a binary copy, it fails when the Master CF is bigger that the Copy CFs.

I don't like the idea to prepare from scratch a new Master for each new lot#, or to look for the lot# with the smaller size and use it for Masters.

I know that this size differences might be due to bad block management, introduced by the manufacturers in order to increase the yeld of NAND Flash devices.

I was wondering if there is a way to mark some extra blocks as bad (independently from the filesystem) in order to decrease the available size below a size that likelly I won't never find in a new CF of 8GB.

My application actually needs the following 5 partitions:

C: Pri DOS FAT16 2047MB
Extended DOS:
D: logical FAT16 2047MB
E: logical FAT16 1028MB
F: logical FAT16 1028MB
G: logical FAT16 1028MB

There are typically almost 500MB unallocated(depending of lot#) that could contain entirely fake bad blocks without effecting my application.

Thanks in advance for any suggestion
ASCA

jf.argentino 08-31-2010 04:38 AM

you could specify to the "dd" command the amount of data to dump with bs and count option.

asca 09-01-2010 02:17 AM

The command "dd" works fine for single CF duplication. It is able to recreate all the partitions even if the dumped data are a little less that the full capacity.
But actually I would like to have a "small size" Master CF suitable for my stand alone duplicator that is able to make 8 copies for each duplication process.


All times are GMT -5. The time now is 05:38 AM.