No entry sign on 2017 Macbook Pro--will replacing the hard disk work? I received a broken 2017 MacBook Pro from a friend who had given up on it. On attempting to boot it up I saw the "no entry" sign, which as far as I understand means there's something wrong/corrupted in the hard drive. I managed to get to the internet recovery screen and attempted to reinstall the OS but couldn't. Running First Aid showed that the APFS file was corrupted in a way that I couldn't fix. I tried to delete the file and replace it with a new one and that didn't work either. For reference, I'm a software developer but I don't understand much about BIOS and such things, especially on Apple computers which I never use.

After a few deletion attempts, or maybe a successful one, I don't remember, I became unable to reach the recovery menu again. The Apple logo would appear with the loading bar, and the bar would fill a tiny amount over 10 seconds or so before I was sent to the black screen with the no entry sign again.

Due to my hacking (I'm guessing) I can no longer seem to access the Internet Recovery menu. Does anyone know a solution to this problem? I thought of maybe trying to boot from a Linux disk or USB or opening up the laptop and physically replacing the hard drive. Would either of these work?
Why not install a fresh copy of macOS on an external drive before you make any changes to the internal drive. This Mac supports internet recovery so you can boot to internet OS - use Disk Utility to erase / prepare the external drive (USB or Thunderbolt is fine) and then download the installer from the internet while in recovery boot.

Now you can boot to the external drive and make sure the system is healthy and see if you can wipe the internal or need a repair.

If you have nothing to lose on the Mac, follow Allan’s excellent answer for how to erase and install without pausing to work on an external drive.