OK, lets start off here on the Windows utility you are trying to use here Parted Magic it does not support the Mac's disk structure and file system your system has here: GUID & Mac OS Extended (Journaled). You would need either to use Apples Disk Utility or something like this: Drive Genius
But lets see if we can work with what you have now.
You state you took out the old drive as it failed with Parted Magic. If the drive is still able to boot up under Mac OS-X lets see if we can get that far as we need it to gain access to the utility it has on it in the Application/Utility folder Disk Utility but the system needs to be running Mac OS-X first to use it.
You'll need something like this: Startech 2.5" SATA to USB adapter so we can connect your new drive to your system. Now we can use Disk Utility to setup your new drive. Here's a small write up that gets into it: How to Manage Disks and Volumes with OS X’s Disk Utility
The other option here (if the drive is not recoverable) is if your system has the updated firmware is to connect your system to the internet (as fast a connection possible) then let the Internet recovery service download from Apples site the installer. To get the system in to this mode restart it and hold the following keys: Command-Option-R for reference: Startup key combinations for Mac
Once the installer firsts loads up you can access the Disk Utility services from within it. It can take sometime depending on your network & internet speed.
Once the Mac OS is installed, you should make a bootable backup drive so you have a means to do drive repairs more quickly. I would prep up a 16 GB thumb drive using Disk Utility to first wipe the FAT32 partition the USB drives tend to have on them and then setup the needed GUID & Mac OS Extended (Journaled) partition.
Now go to the Apple store and download the OS installer (only the newest version will be available - MacOS Sierra) download it, exit the installer which will autolaunch, make a copy of it as afterwards it will be deleted (its in your Apps folder) then relaunch it. You'll want to run it twice here first updating your system with it and then again to install the OS onto the thumb drive. Once done copy the OS installer to the dumb drive just in case for the next time.
The last piece here is if you want to run Windows you'll want to setup BootCamp with your Windows OS image file or DVD. Follow this on how to do it: How to install Windows using Boot Camp.
Don't forget to add more memory if you only have 4 GB, I would go with 12 or 16 GB if you are running both OS's (macOS & Windows). If you aren't then 8 GB will be just fine for most things.
Let us know how it goes. Good Luck!
2 Comments
Your systems specs: MacBook Pro 13" 2.9 GHz i7 (Mid-2012)
Your new drives specs: HGST 7K1000
by Dan
I should add this system tends to have problems with the HD's SATA cable. You may want to bring it into an Apple Store with the original drive in place to get it covered under the extended warranty they have for it.
Otherwise you should replace it following this IFIXIT guide: MacBook Pro 13" Unibody Mid 2012 Hard Drive Cable Replacement
by Dan