I don’t exactly recall when Apple’s Migration Assistant started logging out the user (10.9ish), but since then it has been a little more irritating to migrate from a dmg or other image format (as opposed to a source hard drive or time machine backup). Here is a simple Terminal command to mount the image as root and thus keep it mounted after logout.
sudo hdiutil attach diskimage.dmg
This process does require running a checksum, and for larger images that could take a while. Once you run this command and it completes its verification of the disk image, simply run Migration Assistant and complete the migration. After migration and a restart, the image is unmounted and you are ready to work on your newly migrated mac. (note: migration can also take quite a while depending on the amount of data)
Note: to skip verification, use -noverify (only do this if time is critical. You will want the cleanest possible start to your newly migrated computer).
You are a life saver. Thank you!
It’s 2019, still saving lives. Thanks!
Hm…. Does this work with .sparsebundle images on X.14? I can’t seem to get my client’s crucial backup I made onto an external drive to appear in Migration Assistant.
Yes, .sparsebundle images work (even encrypted ones), and i used it with Catalina just the other day.
Thank you. Your post just saved me a considerable headache 🙂
Here we are, 2020, usb-c-only Macbooks and no apparent way to migrate… This is only getting more relevant. Thanks!
Brilliant, thanks!
Note in my case my image was on an external drive, so it was under ‘Volumes/DRVNAME/imagename.dmg
Lifesaver.
P.s. Big Sur trashed this MBP, hence complete fresh install and migration assistant …. grrrr.
Wow, I can’t tell you how much this helped me! I had a situation in which someone attempted to install Big Sur without enough space and it stalled midway through.
So I saved the disk image from recovery, started a new install of Big Sur, and then was able to mount using the above command and move everything over seamlessly with migration assistant. THANK YOU!
Doesn’t work for me. Big Sur update failed to install, so I imaged the SSD (APFS Container) into a DMG. When I open the file, it mounts as an external drive – exactly the same way as running the command you mentioned. However, the Migration Assistant doesn’t recognize it as a valid source. It’s been stuck at “Looking for other sources” for over an hour now. I’ll leave it on overnight.
I think the failure has more to do with whatever caused the install failure or perhaps something that the install failure itself caused. I have had systems that Migration Assistant just won’t recognize for whatever reason. or perhaps a failure of Migration Assistant itself. This is only a solution for maintaining a mounted disk image through logout. sorry about your difficulties.