Using ZEN7.....

I have edited the initrd file to include a script that spans an image over
2 CDs....nothing fancy. The computer boots fine from the CD, reads the
script, mounts the CD, restores the first part of the image from the first
CD, ejects the CD and prompts for the second CD, restores the second part
of the image but when the last file is written to the hard drive...I
recieve the following erorr:

"**glibic detected***malloc():memory corruption: 0x0822aa90***
../bin/CDScript.s: Line 43: 1961 Segmentatio Fault img rl

This is the same syntax used for the first image and it works fine. If I
restore the image form the ZEN Image Server the images restore fine
(another words, the image doesn't appear to be the problem). The image
actually works if I just power down but of course it doesn't end nice and
neat. The only thing left in the script after the completion of the second
part of the image is to eject the CD and prompt the user to press enter.

img rl "/mnt/cdrom/d530-sysprep2.zmg"
echo "Imaging process complete, please ensure that there are no CD's in the
drive then press Enter to reboot."
reboot -f

Any ideas. I have reached the limits of my knowledge!!!!

Thanks in advance.