Just to update, If I continue with process, compile configuration and use that for mac image.
I don't see Recovery HD which effectively prevents me from enable file encryption on the disk.
I don't think that you can get a Recovery partition using Compile. Is there a reason you're doing that?
Have you given thought to building the components you need into the AutoDMG image creating process instead of compiling with Casper? There is a tool that you can deploy to install the recovery partition on computers that don't have it. I think this is it:
https://github.com/MagerValp/Create-Recovery-Partition-Installer
@scottb Thanks for the suggestion. when I used the configuration without compilation it worked perfectly and I can see recovery HD.
I am new to this and I was compiling it because I thought that is required step to build a configuration :).
I have another issue now which is that policy history is not being flushed after re-imaging. I added the script to flush with configuration to run at "reboot", but it appears it is not being executed because I can see policy log, when I run the command to flush the policy history manually, it works fine.
Any suggestion why this might be happening?
When I was using the compiled configuration with casper image, I wasn't facing this issue.
We used to use that a while back. But dumped it for a modular approach that most use.
I think it might have also been the only way at one time to get a block copy, but maybe that's made up in my head.
As to the other issue, are you erasing the Mac during the Casper Imaging process?
@jamfquery Yea compilation is not really needed & rarely recommended.
The policy history should be flushed as part of the imaging workflow (I think), can you post the workflow?
How are these policies scoped?
If the flushing becomes a real problem just add a script set to run on reboot with
jamf flushPolicyHistory
Not really a solution, but it will certainly do the job. Most people have some kind of first run script anyway so add it somewhere near the top and it will get the job done.