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

Unable to clone internal SSD on MacBook Air to external 256GB SSD

Hi everyone,


I'm trying to replace the 128gb M2 SSD inside a 2017 MacBook air with a 256gb SSD


To do this I'm using an external caddy containing the 256gb SSD and using disk utility launched from the recovery console


The SSD works without any problem on a PC that I originally formatted it on and transferred a large amount of data to. When I plug it into the Macintosh when it is up and running, I can see an NTFS volume without any problems at all.


When I plug it in the Mac and use disk utility to erase it, I can see a Mac volume without any problems at all so I'm sure there is no problem electronically with the drive


When I boot up the recovery console click on the freshly erased drive and then click on restore and select the Macintosh HD the following error occurs


Validating target...

Validating source...

Repartitioning target device...

Could not change the partition type for /dev/disk4s1 - error -5342

the operation could not be completed (OSStatus error -5342.)


I have search repeatedly online, but I am unable to find any reference to this code.


I removed the drive off the USB cable pushed it back into place and attempted to do the same thing and got the same result.


I then rebooted the system into recovery mode again and attempted the same thing again but with the same result


I would be grateful if anybody had any ideas at all about what may be causing this error


The days when people used to say about Macintosh "it just works" I think are truly over....



​​

Posted on Mar 19, 2022 4:06 AM

Reply
Question marked as Best reply

Posted on Mar 19, 2022 5:01 AM

Not clear to me but did you use Disk Utilities and format the drive to APFS and Guid partition? You need to do that before anything else. Also if you want to make a clone I would suggest using an app like carbon Copy Cloner.

Similar questions

8 replies

Mar 22, 2022 4:05 PM in response to AlienPsyTing

Sorry about the delay. I had started a reply the other day and never finished it and I lost what I had already typed. I'll try again....


I believe the 2017 MBAir shipped with macOS 10.12 Sierra which cannot create an APFS volume (although it can read an APFS volume). If you are booting into Internet Recovery Mode, then it appears you may have booted into the installer for the original OS which shipped from the factory. In theory using Command + Option + R should boot into the most recent compatible OS which should be macOS 12.x Monterey, but sometimes it will only boot into the original OS installer for the OS which shipped from the factory. You can create a bootable macOS USB installer using the instructions in this Apple article:

How to create a bootable installer for macOS - Apple Support


In order to use Carbon Copy Cloner you need to either boot from the internal drive or from a full macOS external drive that has the same or higher version of macOS. CCC is the best option to attempt to preserve any licenses of proprietary third party apps like MS Office, although another option would be to install the same or newer version of macOS to the new SSD and use Setup Assistant/Migration Assistant to transfer the user account(s) and apps (may need to reactivate some third party proprietary apps which use license keys).




Apr 5, 2022 2:26 PM in response to AlienPsyTing

OK so just for an update.


I went back last week to try and complete the clone and to test out your idea that the version of repair console was unable to do an APFS format, I plugged in an external SATA HDD and it formatted to APFS no problem, but when I put the M.2 SSD in the caddy that originally used, (not an Apple SSD but a PC M.2 SSD with a PC SSD to MAC SSD adaptor fitted) it wouldn't format APFS.


So, it seems this PC M.2 SSD, with an adaptor, can't be formatted APFS.

I also booted the system up and tried again but no APFS option available which is a bit strange as I could erase it using any of the other formats.


Anyway, all's well that ends well, as the bard use to say, so thanks guys for trying to help me out, regardless I learned from both of you something new about cloning on a Mac. My main work is on PC's and Servers, Win 10, Win Server, home broadband etc. etc. so being called out to Macs is very rare and I have been able to pretty much fix all the problems I have had except one that I have on a friends Mac that's playing hard to fix. Ill post in a new thread and send you guys the link if you like if you fancy a crack at it.


PS I did clone successfully to the SATA SSD, then swapped the 128GB M.2 to a 256GB, booted off the external SATA SSD and used Disk Utility to clone - at last :)


I put in so much effort on this as the lady client I'm doing it for is quite poor, thanks to lockdowns, so I only charged her 3 hrs (Which took three visits in the end) in the end which she was chuffed about as she hasn't got the money for a new all shiny Mac.......

Mar 20, 2022 10:04 AM in response to AlienPsyTing

I completely agree with @tbirdvet's suggestion to use Carbon Copy Cloner (CCC) to clone the macOS boot drive. Disk Utility has always had issues when cloning a macOS boot drive. I've never had an issue using CCC to clone a macOS boot drive. If you are cloning a macOS 11.x+ installation, then you need to right-click or control-click on the destination location within CCC and select the "Legacy" option.


Edit: Just make sure to first erase the destination drive as GUID partition and APFS (top option) before using CCC.

Mar 21, 2022 5:00 AM in response to tbirdvet

Thanks to both of you for taking the time and trouble to reply, and just for some

further information I have put a screenshot of the offers of format type when I

have a chance to erase the drive.


For a bit of further info normally most of my work as a technician with my clients

involves WinServer, Windows 10, sometimes Windows 7 and Linux systems although

I have some quite considerable Mac experience from the past but a bit too far

in the past to be particularly useful today.


Also again just for your information this is only the second time that I’ve actually

cloned a Mac disk, the first time was on a 21 inch iMac with a failing internal

hard disk drive that I close to an external SATA III SSD drive without any

problems.


Not sure why this is causing a problem at all as just checking out vids on YouTube

this seems to be quite a common way to initiate a disk clone however I will be

advised by both of you and just this time I will try out Carbon Copy Cloner.


Thanks again for taking the trouble to reply, much appreciated, I would be interested to

know why though on the screenshot there is no offer of APFS as a format type?


Unable to clone internal SSD on MacBook Air to external 256GB SSD

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