I have this old 1TB HDD from a previous device, and it has some partitions that I want to get rid of. I'm trying to wipe the drive completely clean, but my MacBook keeps throwing errors every time I attempt to erase or partition it. I've tried using both the terminal and recovery mode, but nothing seems to work. Here are some of the errors I've encountered:
1. When running First Aid in recovery mode: "Problems were found with the partition map which might prevent booting."
2. "The partition map needs to be repaired because there's a problem with the EFI system partition's file system. (-69766)"
3. Unmounting disk errors, including "Couldn't open device. (-69877)" and volume errors indicating it couldn't be unmounted due to being in use by a process.
2 Answers
It sounds like the HDD might be failing, or there could be an issue with the cable connecting it to your MacBook. Try force unmounting the disk; run `diskutil unmountDisk force /dev/disk2` in the terminal. After that, see if you can erase it again.
I faced a similar situation, and sometimes it can be due to a bad partition map. If force unmounting doesn't work, you might need to consider using a different tool or software to reformat the drive entirely. Tools like GParted can be really effective for this kind of issue!

Related Questions
Lenovo Thinkpad Stuck In Update Loop Install FilterDriverU2_Reload