Restore Disk Image File To Internal Drive Using Disk Utility
Currently on Ventura 13.3.1, but hoping to come up with a solution that will work with the newer operating systems as well. Using Disk Utility, able to copy an installed partition from an external disk drive to the internal drive and then install Ventura over the top to seal it. This action is performed in recovery disk (utilities). I want to do the same with a disk image file.
Using Disk Utility, it is possible to create a disk image file without a broken seal (select container in left pane of Disk Utility). Source disk image is installed on external disk drive (seal unbroken), shrank partition to minimal size. Selected menu item File -> New Image -> Image From “Container <>”. I will discuss the read only and read write options since I don’t want disk compressed and DVD/CD master is a different file format.
Trying to copy the disk image file to the internal drive without mounting it, since that usually breaks the seal and it becomes unusable. Ideally, use the recommended method by Apple. Restore a disk image to a disk using Disk Utility on Mac - Apple Support Select internal drive, select restore, click the image button in restore dialog and select disk image file. Click Restore.
1. First Step: Images -> Scan Image For Restore…
Readonly Disk Image: Success
Read/Write Disk Image: Error, can’t scan read/write images.
2. Next Step: Select disk image to Restore (selecting container)
Readonly Disk Image Scanned For Restore: Error, contains more than one APFS volume.
Readonly Disk Image Not Scanned: Success
Read/Write Disk Image (can’t be scanned): Success
3. Next Step: Restore Disk Image
A broken seal fails at the validation step.
Readonly Disk Image (dialog doesn’t accept scanned image):
…Could not find any scan information… Will restore as mounted disk image.
Volume replication failed - Read-only file system
The operation couldn’t be completed (OSStatus error 30.)
Read/Write Disk Image:
…Could not find any scan information… Will restore as mounted disk image.
Volume replication failed - Read-only file system
The operation couldn’t be completed (OSStatus error 30.)
For Step 2, if I double click the disk image file to mount it and select the disk image in the left pane, the restore completes successfully. The timestamp on the disk image file is updated, but the seal is not broken. You can’t double click a file in recovery disk (utilities).
For Step 2, if I use File -> Open Disk Image…, an action that can be taken in recovery disk (utilities), the seal is broken.
Validating target…
Validating source…
The source volume cannot be restored because it has a broken seal
Could not validate source - invalid argument
The operation couldn’t be completed. (OSStatus error 22.)
Since the recovery disk (utilities) also allows command line actions, is there a command line equivalent of double clicking the disk image file to mount it OR a diskutil command that could copy the disk image successfully? The disk image file would be something like /Volumes/DriveName/DiskImage.dmg.
Mac mini (M2 Pro, 2023)