Disk Utility to clone and restore bootable drive (Mojave)
A response and potential solution to a previous post with a similar header.
https://discussions.apple.com/thread/250370398?login=true
This took me hours of trial and error to accomplish through use of a 2015 MBP...no idea why so problematic with Mojave's restore mode in order to save a fully configured OS installation as a disk image for future restores (for say, an SSD failure or capacity upgrade), who wants to do that all over again? For me a clone is more straight forward and trustworthy than using Time Machine, and faster then a file duplication approach.
Problem: persistent errors cloning and restoring APFS bootable partition for Mac Pro 5,1 (but could also be just as applicable to MBPs running Mojave 10.14.x?). Errors looking like this:
Restoring
Verifying
Inverting target volume...
APFS inverter failed to invert the volume - Invalid argument
The operation couldn’t be completed. (OSStatus error 22.)
or...inapropriate ioctl for device, blah blah (OSStatus error 206.)
No amount of trial and error in Mojave's restore mode worked reliably. The solution that worked for me was to use the newest version of Disk Utility (v21) within Restore mode of Monterey - so if Mojave is installed, establish a partition on a MBP with a fresh, legit install of Monterey. I could only do this on my 2015 MBP (presumably any other Monterey compatible MBP would suffice, I didn't try this on one patched to accomodate Monterey). I connected my 5,1 SSD using a USB3 external case. I only used Monterey for the purposes of cloning/eventual restoring a volume with Mojave installed, which unlike Monterey gets along fine with my 5,1).
It appears one can deliberately boot into Monterey's restore mode (as appose to Mojave's) by restarting while in Monterey, then instantly holding down cmd-r, and continue to do so well after the chime and until the darker UI appears. Perhaps there is a more elegant way to do this using terminal. Would love to know if someone has info.
The clone and restore process went like this:
- In Disk Utility (Monterey restore mode), make a blank APFS image with approx 20-30GB padding with respect to the size of your source volume, and save to your MBP. For settings: single partition, read/write
- Select that image at the bottom left column of Disk Utility and restore with your source volume (in my case was a test OS install from my externally connected SSD). This two step process replaces the previous and far simpler one step process to make an image of a volume.
- Now, using that image one can then restore to either a whole SSD, or a volume in a select APFS container on a your target SSD. Side note: I had success in the next step with using either as-is or a compressed final image. To compress use 'Convert' in Disk Utility to remove the excess bloat.
Keep in mind it may be a wise to do a trial run of these steps with a fresh install of Mojave (or later OS) to ensure these scheme works reliably for you while in Monterey restore mode.
BTW I tried performing all this using Disk Utility while booted into Monterey but saw similar errors. Go figure. I hope this helps folks who like to archive and precisely restore complete drive configurations the way I do, and much prefer Disk Utility over a file duplication scheme such as Carbon Copy Cloner. Good luck :)