Cloning CompactFlash image

  • Thread starter Alberto Serrano
  • Start date
A

Alberto Serrano

Hi!

I've built a working and tested xpe image (with a licensed version of
the development system). I've deployed it to CF (an industrial Sandisk
cf).
I've not included the cloning the cloning tool, since i'm not going to
connect the systems to a network, and doesn't matter the SID problem.

The system is based on minlogon and EWF to protect the CF.
The image consists in two partitions, one for the system (Primary FAT
256 MB) and an extended one with to logical units, the first for the
data (FAT 128 MB) and the second made by the EWF (about 30kb). The
system is tested and working ok.

I've made an Acronis True Image 8 image file of the full CF disk (512
Mb), using an IDE-CF adaptor.

The problem is that when i restore the image (into another CF wich is
exactly the same model of the first one) it does not work.
The PC starts, then goes the BIOS POST and then the screen goes black
and this is the end.

I've tried the SOS flag in boot.ini but it's the same.

Anyone knows what i'm doing wrong?
Thank you all for your help.
Regards BERTO.
 
K

KM

Alberto,

I am not familiar with the Acronis software so I suspect it may not work for you as expected.

When you clone the image on a different CF card (restore the image to the card), did you verify the result CF content?
Did you see the partitions created with proper FS and file&directory structure of your image?
Also, verify that the system partition in your design is marked as active on the new CF card after you restore the image on it.

Also, please set a non-zero timeout in boot.ini to see if you get to load ntldr at least.

KM
 
A

Alberto Serrano

Hello :)

Thanks for your help.
I am not familiar with the Acronis software so I suspect it may not
work for you as expected.

Ok.True Image is similar to Norton Ghost and does very good its job (at
least as i've tested myself).I've used it to clone XP,Linux...systems
without problems.It's also named in Windows XP Embedded Advanced book
from Sean D.Limin in the Cloning chapter.
When you clone the image on a different CF card (restore the image to
the card), did you verify the result CF content? Did you see the
partitions created with proper FS and file&directory structure of your
image? Also, verify that the system partition in your design is marked
as active on the new CF card after you restore the image on it.

Yes. The partitions and the files are there and they seem correct. The
primary partition is marked as active.(The original system is booting
and working properly,remember?)
Also, please set a non-zero timeout in boot.ini to see if you get to
load ntldr at least.

Can you show me a little example?

Again, thank you very much.
 
K

KM

Alberto,

[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Embedded" /fastdetect
multi(0)disk(0)rdisk(0)partition(2)\WINDOWS="Test entry (do not select!)" /fastdetect


If you don't see the ntldr menu that means your CF card is not bootable.
What FS (file system) you use on the primary partition, btw?

KM
 
A

Alberto Serrano

You are right. I can't see the ntldr menu.

The primary partition of the CF is FAT16 as the first logical drive of the
extended partition. The EWF created logical drive is marked as 0x45 type
(Eumel/Ergos).

I don't know what is going on. The original image on the first CF is
working properly. I will try another cloning tool like Norton Ghost.

Can you tell me any other tip?

Thanks a lot.
BERTO.
 
K

KM

Alberto,
You are right. I can't see the ntldr menu.

The primary partition of the CF is FAT16 as the first logical drive of the
extended partition. The EWF created logical drive is marked as 0x45 type
(Eumel/Ergos).

I don't know what is going on. The original image on the first CF is
working properly. I will try another cloning tool like Norton Ghost.

Can you tell me any other tip?

I'd try a few more things that unlikely fix your problems with the cloning software but, at least, will shed more light on the
issue:
- run bootprep on the new CF card after you restore the image on it
- switch to NTFS for the primary partition
- run fdisk /mbr on the new CF card (again, after the restore)

For the attempt 1 and 3 you will have to boot to DOS (floppy or CD) and have only the new CF card presented (better on target with
IDE-CF adapter).

KM
 
A

Alberto Serrano

Good tips. I will try them.
I will post as soon as i get new results.

Thanks KM :)
 
S

Slobodan Brcin \(eMVP\)

Alberto,

One more thing.

Sometimes that little hidden EWF partition can make a problems and prevent you from reaching ntldr. (Crazy but I have see it.)
You can configure RAM EWF trough registry only so this config partition is not needed and can be removed or even TD can be
configured so this partition is never created.

Regards,
Slobodan
 
A

Alberto Serrano

Hi again.

The fdisk /mbr or bootprep over the dumped image does not help. I tried
erasing the extended partition (with the two logical drives) but it's
the same.

Thinking about the problem showed up something. I formatted,bootprep..
the original CF in the prototipe PC which is not the same as the
development one.
But i made the Acronis image with the CF-IDE adaptor attached to the
development PC. This can be a problem. I manually configure the CF disk
drive in BIOS to NORMAL CHS scheme. This config is shared in the two
computers but...BIOS is BIOS.

I don't have now access to the prototipe PC. I will make some testing
about this problem in a few days.

Anything else in your brain?

Again, thank you very much for your help.
Best regards, BERTO :)
 
S

Slobodan Brcin \(eMVP\)

Hi Alberto,

fdisk /mbr can't help since it IIRC replace MBR code only and not parititon table in same sector that contain CHS geometry.

You must prepare CF on computer that you will use since same disk can be reported with different geometry on different BIOS/MB.
So you must do fdisk, format,boopprep on prototype device if you want CF to boot there.
But i made the Acronis image with the CF-IDE adaptor attached to the
development PC. This can be a problem. I manually configure the CF disk
drive in BIOS to NORMAL CHS scheme. This config is shared in the two
computers but...BIOS is BIOS.

BIOS is not a BIOS and you must use CF on same type of motherboard and BIOS revision as the master one.

Regards,
Slobodan
 
M

Mark K Vallevand

I've seen this problem when using a tool that understands the file system
and doesn't do a true binary byte-by-byte copy.

If you are going to copy the image (eventually) onto the same device, it is
best to do a byte-by-byte binary copy. I wrote a program that copies from a
physical drive to a file and from a file to a physical device.

If you want to copy using a tool like ghost or diskpart+format+fdisk, you
might end up with a boot block on the target that isn't quite right. I
ended up writing a program to patch one byte and made it work. You'll need
to patch the Partition Boot Record of the first bootable partition and
change the number of heads to 16. Its at offset 0x1a in the PBR, a uint16
value. I bet that the value is 255 in your target.

I found this problem by doing a binary comparison of the Master Boot Record
and Partition Boot Record between two images that should have been
identical. But, one booted and one didn't.

--
Regards.
Mark K Vallevand
Slobodan Brcin (eMVP) said:
Hi Alberto,

fdisk /mbr can't help since it IIRC replace MBR code only and not
parititon table in same sector that contain CHS geometry.
You must prepare CF on computer that you will use since same disk can be
reported with different geometry on different BIOS/MB.
So you must do fdisk, format,boopprep on prototype device if you want CF to boot there.


BIOS is not a BIOS and you must use CF on same type of motherboard and
BIOS revision as the master one.
 
R

Richard

Or, you can skip all the headaches and use DD in Linux. Works here
perfectly while nothing else had.
Ahh, it will work with USB CF Writers as well, so they don't "have" to be on
a IDE CF Adapter.

Richard
 
A

Alberto Serrano

Hi again.

Thank you all. I don't have the protype PC now to do the testing. I will
try Linux dd command (thanks Richard :) .I'm using Debian Linux here for
other jobs so it's a good chance.

See you.
Regards, BERTO :)
 
M

Mark K Vallevand

Yes. Using 'dd' is a good choice. I wrote a Windows program because Linux
and 'dd' aren't available to the folks that need to duplicate the media.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top