Cloning Compact Flash Memory in Embedded Applications

K

Thread Starter

Ken Brown

Does anybody know of a utility that will enable me to clone a bootable DOS image on a compact flash disk? We have been doing this one at a time by booting a system from a floppy and then formatting the flash and transferring the OS / system files as part of the format operation. This is very time consuming and it would seem that you should be able to clone a disk image in a manner similar to the utilities that allow you to clone floppies and CDs.
 
A

Alex Pavloff

How are you talking to the CompactFlash? USB,PCMCIA,or straight IDE? I have basically the same problem as you, and haven't done enough research on it to figure out how to do it under Windows. While all the files can be copied, making it bootable is pretty tricky under Windows, because you (as a small utility program) aren't supposed to be able to mess with disks in that manner.

Under Linux, one can probably use dd to read / write the raw data from the disk, but this only works when you have the same size CompactFlash, and again, I haven't done too much testing on it.

Alex Pavloff
Software Engineer
Eason Technology
 
We have developed a small Ethernet / HTML server to connect to a motion controller on the PC104bus. It works great, but success is having an impact when we have to program 100 units at a time. It is seen as a bootable drive on the PC104 board (IDE Compact Flash). We would like to be able to Clone it from a Windows 2000 Pro machine using a PCMCIA adapter (optimum solution)
. . . but would look at doing it with a simple utility from one of our DOS embedded computers.
 
C

Curt Wuollet

Hi Alex

The way around the filesystems size problem is to make the proper size image as a file. You can mount it with the loopback driver. I did this
long ago to fix a trashed flash. I didn't write it down (dumb) but the info came from the diskless workstation and CDRON Writing HOWTOs I
believe one can simply dd it on. All this is under Linux of course. I'll bet any of the Embedded Linux sites will detail this. It _should_
work with any supported filesystem.

Regards

cww
--
Free Tools!
Machine Automation Tools (LinuxPLC) Free, Truly Open & Publicly Owned Industrial Automation Software For Linux. mat.sourceforge.net.
Day Job: None, are you interested?
Consultancy: Wide Open Technologies: Moving Business & Automation to Linux.
 
R

Richard Mahn

You could use Norton Ghost or PowerQuest Drive Image to copy the image between a file and the flash. Given that for the most part the image and
the flash can be the exact same size, using dd (even under Windows using Cygwin) will be your best bet.
 
A

Alex Pavloff

As the other poster said, rawrite will work just fine, like dd, as long as the compact flash stays the same size. I don't think this can be done from the Windows 2000 Pro machine, as I haven't had any luck getting "raw" access to any drivers from Win2K.

The problem with the DOS box is that unless its on the network, it'll be annoying to find it and update it every time you want to make a change to
your program. This is why I suggest the Linux box -- it can sit on your Windows network AND program the compact flash.

Alex Pavloff
Software Engineer
Eason Technology
 
I download the file from the site below but it works only with FDD. Is there any way to copy the binary image of a CF and then restore it?
 
Top