You are not logged in.


[2017.09.08] DeployStudio build v1.7.8 (checksum, release note).
[2016.08.26] DeployStudio build v1.6.19 (release note).
[2013.02.23] DeployStudio last universal build v1.5.17 (release note).

#1 2019-10-10 19:49:36

Registered: 2011-07-19

Craete Mojave image?

Forgetting the restore process, can we create APFS Mojave image?
My first try failed miserably

Booting from 10.13.6 USB DS stick, trying to create image from internal HD Mojave 10.14.6, fails...

No problem creating .dmg with CCC or SD


Last edited by sebus (2019-10-10 19:57:54)


#2 2019-10-23 19:29:38

From: Boulder, CO
Registered: 2018-10-29

Re: Craete Mojave image?

I seem to be the last man standing here in the forums...

Yes! You can in fact create an APFS Mojave image. It has some very specific requirements:
1) On the Mojave system from which you want to create an image, you must launch from a 10.13.3 boot system - NOT the latest/last version of 10.13. You can do this either from a netboot or a DS USB stick. (This only applies to the Client Runtime. DS itself can be on any version - I think I am running El Capitan for my DS 1.7.9 server and Snow Leopard Server for netboot.)
2) Your image source MUST match your target format. (You can't image an APFS and send it to an HFS; more subversive: you can't image an APFS single drive to an APFS Fusion drive or vice-versa.)

1) DS doesn't handle targeting restore correctly - so you have to do it by "Drive Name" and make sure you've set up the target drive's name to match.
2) DS doesn't restore the Preboot and Recovery partitions correctly, so you will need to drop in a simple script to handle that (reply back if you need it and I can post the script)

Some suspicions:
Although creating a Mojave DS image doesn't work above 13.3, I suspect an USB Mojave stick (or custom Recovery partition) with the DS 1.7.9 Client Runtime ought to fix a few issues with recovery - haven't had a chance to test that yet. Specifically: DS Recovery breaks APFS Fusion which I think is related to Mac OS 13.x not having the drivers to handle APFS Fusion; and I believe the Restore by "Last" or by device ID might work again.


#3 2019-10-31 21:40:46

Registered: 2017-07-21

Re: Craete Mojave image?

I agree with Christopher - You can still create and restore images using DeployStudio although it takes some work.
I was able to script a process that creates a 10.15.0 (Catalina) Image and stores it on DeployStudio.
You can then use a script to restore the image to another mac.
The key is using the "ASR" command line instead of the built in Capture/Restore process in Deploystudio.
I just created a .sh script that runs when you choose a task sequence. I'm happy to share my scripts if anyone is interested.


#4 2019-11-04 10:50:47

Registered: 2016-06-03

Re: Craete Mojave image?

Hi Jeremyd,

Can you please share your script for preboot, VM and recovery.



#5 2019-11-05 14:34:32

Registered: 2017-07-21

Re: Craete Mojave image?

Hey Jay,

If you use ASR to restore the image it actually copies the preboot and recovery partitions as well so everything is bootable.
#Delete and Re-partition creating a APFS Container and temp volume, then delete Temp Volume
diskutil partitionDisk /dev/disk0 1 gpt apfs "MacOSPrep" 100%
diskutil apfs deletevolume MacOSPrep
# Must be running on a 10.15 boot disk for next step to work and restore both System and Data Drives
sudo asr --source /tmp/DSNetworkRepository/Masters/APFS/CatalinaImage.dmg --target /dev/disk1 -noverify
#make sure Disk is Mounted to configure the rest
diskutil mountDisk disk1
#Pause 2 seconds to allow disk to mount
sleep 2
exit 0

Back when I restored a Mojave image I did have to restore Preboot and Recovery though.. Here is the script I had for that


BootUUID="$(diskutil apfs list | grep "Volume disk1s1" | awk {'print $4'})"

echo $imagepath
echo $imagefile
echo $BootUUID

echo "Deleting Existing Preboot Volume"
diskutil apfs deletevolume disk1s2
echo "Deleting Existing Recovery Volume"
diskutil apfs deletevolume disk1s3

echo "Creating New Preboot Volume"
diskutil apfs addVolume disk1 apfs Preboot -role B
echo "Creating New Recovery Volume"
diskutil apfs addVolume disk1 apfs Recovery -role R

echo "Mount the Preboot Volume"
diskutil mount /dev/disk1s2

echo "Unzip the Preboot File" $imagepath/$imagefile" to the Preboot Volume"
tar -xvf $imagepath/$ -C /Volumes/Preboot
rm -R /Volumes/Preboot/.Trashes

echo "Rename the unzipped_pre_UUID folder to the current BootUUID of" $BootUUID
unzipped_pre_UUID="$(ls /Volumes/Preboot)"
mv /Volumes/Preboot/$unzipped_pre_UUID /Volumes/Preboot/$BootUUID

echo "Mount the Recovery Volume"
diskutil mount /dev/disk1s3

echo "Unzip the Recovery File" $imagepath/$imagefile" to the Recovery Volume"
tar -xvf $imagepath/$ -C /Volumes/Recovery
rm -R /Volumes/Recovery/.Trashes

echo "Rename the unzipped_rec_UUID folder to the current BootUUID of" $BootUUID
unzipped_rec_UUID="$(ls /Volumes/Recovery)"
mv /Volumes/Recovery/$unzipped_rec_UUID /Volumes/Recovery/$BootUUID

echo "Making the Drive Bootable"
bless --device /dev/disk1s1 --setBoot

bless -info "/Volumes/Macintosh HD"

exit 0


Board footer

Powered by FluxBB