Chosen Solution

I had an issue with my mac a few weeks ago where it wouldnt boot. Was able to boot to a ubuntu boot drive so mobo and apu seem to work. Replacment drive appered today. Dosnt show in disk utility or terminal when riunning the disk util list command. Help would be appreachated Update (01/27/2022) @danj the link you gave me takes me to

. the link within there for mojve advises i need to have the app store to download it

.

You are likely fighting the HFS+ Vs APFS file system confusion or not using a version of macOS that offers the needed support for the new drive! I’m assuming you are booting up with Sierra or older (or in your case trying to use ubuntu which likewise can’t see or deal with APFS), but your system was running High Sierra or newer! So the Disk Utility (Linux tools) you are using has no idea what a APFS disk looks like so it won’t see it nor allow you to format as there is no free space. So you’ll need to create a bootable macOS drive using Something that can deal with APFS. I would strongly recommend you start off with Mojave. Boot up under Internet recovery, breakout of the installer, format a 32GB USB thumb drive GUID and a journaled file system, then download to an external drive the OS installer from here How to get old versions of macOS then follow this guide to convert it to a bootable installer How to create a bootable installer for macOS. Repeat this time booting up off of the USB drive and prep your new drive.