You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

How to use a disk image to migrate after a failed upgrade?

Inadvisably, I tried to upgrade from High Sierra to Monterey on a MacBook Air. Apparently, there was not enough disk space (disk util said 16GB available, Monterey said less than 11GB available), so the upgrade failed. Unfortunately, every time the Air starts now, it immediately tries to upgrade to Monterey but crashes after 29 minutes. Sadly, the only Time Machine backup is from several years ago. I used Disk Utility in recovery mode to create a disk image before moving further (ominous music).


I was able to use Internet Recovery to reinstall High Sierra, but only after erasing the internal drive. Now, I'd like to recover settings, programs and files from the image backup. But how? It seems obvious that it should be doable with the Migration Assistant, but I can't figure out how.


I also tried to restore the image back to the erased SSD but was met with the news that I can't restore images containing APFS volumes. It boggles the mind...


Now, I know I made many mistakes in this process and I won't win any Apple Support Engineer awards but I'm sure there must be some way to recover the information in the image file. I confess, I don't really understand how APFS works or what a "volume" means in that world. I just assumed an image could be written block-for-block to recover machine state.


Anyway, I'd be most grateful if any of you could help with this by pointing me in the correct direction. Or is this now irretrievable? Thank you for any help.

MacBook Air

Posted on Feb 6, 2022 3:37 PM

Reply

Similar questions

12 replies

Feb 9, 2022 1:44 PM in response to BDAqua

I've tried many things but here's where things stand. I have a MacBook Air (2015) with an erased internal drive. I also have an image, made with Disk Utility, of the drive before it was erased. The original FS on the drive was APFS but someone has tinkered with it quite a bit, it seems. I would dearly love to recover the user accounts, settings, and files from the image. Here are more details:


% hdiutil attach -owners on AppleSSD.dmg -shadow

(please see "Hdiutil attach Results", above)


After the attach, disks look like


% diskutil list

(please see "Diskutil list Results", above)


A restore produces:


% sudo asr restore --source /dev/disk5 --target /dev/disk3 --erase

Validating target...done

Validating source...

Error finding volume with appropriate role in container /dev/disk5

Could not validate source - error 49245


And image info is:


% hdiutil imageinfo AppleSSD.dmg

(please see "Hdiutil imageinfo Results", above)


As you can see, the original drive was APFS. Sure enough, there doesn't appear to be a startup partition in the image, as far as I can tell. The data partition is fine and a scan (diskutil and hdiutil) is fine, as well, so it appears user data should be there.


Does anyone have any idea how I can recover the user data and settings, in particular? There's really only one user on the machine and she's got lots of files sprinkled everywhere but there's no additional software on the mac. She uses Apple apps for most things - Mail for (surprise) mail, etc. I'd like to recover her photos and contacts, at the least, if possible.


I thought I might just install a clean copy of 11.6.3 on the internal drive, then copy the relevant files/directories from the image file data partition. Will this work? Will I need other files/folder, too? I don't think Migration Assistant will help as it seems to want a startup disk as input (and there isn't one in the image).


Thanks for any help. She (and I) are beginning to panic!

Feb 6, 2022 7:45 PM in response to BDAqua

Thanks for your response.


The drive I made the DMG of is APFS. From what I can tell, that's part of the problem. What complicates it now is that the original drive has since been erased on the assumption that it could be restored from the DMG :(


It occurred to me that I might be able to reinstall High Sierra (using Internet Restore), then mount the image under the new install and copy settings from it using Migration Assistant. But there doesn't seem to be a way to point the assistant to the image. I would have thought that was an obvious use for the Migration Assistant.


I'm also having a really hard time finding detailed information on any of these system utilities (like Disk Utility, Migration Assistant, and other system tools). It seems Apple assumes either nothing will go wrong (which is not my experience) or that users are not sophisticated enough to know, or care, how these things work.


Is there a good reference source on how to do system level repairs on MacOS?


Thanks again for your interest and your help.

Feb 9, 2022 2:45 PM in response to BDAqua

Thank you for your help, again.


I have installed Big Sur on an external drive and can mount the DMG. The question is, what do I copy from the damaged image? And where should I put it?


I could try to restore just the data partition to an external drive, but I haven't figured out how to do that. I could also add a startup partition to the image, but I haven't figured out how to do that, either!


So I'm guessing my only choice is a copy from the mounted image. But I am unsure what to copy.


Any help would be gratefully appreciated.

Feb 9, 2022 3:46 PM in response to BDAqua

As I mentioned, I cannot restore the DMG - I keep getting an error because there is no startup disk in the image. I would like to get all user accounts, user files, and settings from the image file. In particular, I'd like the user's contacts and files. The OS that is installed is the most recent version of Big Sur. I can mount the data partition in the image file and read everything from it. But I don't know what to copy.


Any advice? And thank you.

How to use a disk image to migrate after a failed upgrade?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.