Erase HD when both Disk Utility and Terminal fail.

I have an old iMac G4 (hemispherical base) that won't start. It belongs to a friend who wants me to wipe the HD to remove sensitive details, banking, etc. I can't open the CD drive (and so use an OS Install Disk). So started in Target Mode and tried to erase HD using Terminal. Got his error:


Unmounting disk

Error: -69877: Couldn't open device


Disk Utility can't function on it either saying the disk is locked or (when trying to re-partition) "Can't open the device". Any suggestions for erasing the drive without taking it physically out of the iMac and hitting it with a hammer? Thanks in advance!

Adrian

Posted on Dec 23, 2025 9:23 AM

Reply
6 replies

Dec 23, 2025 9:42 AM in response to aching

You may be able to open the CD tray on startup:

Eject CDs and DVDs from your Mac - Apple Support


Of course, then if the hdd is failing/failed you still won't be able to erase it.


There are tear down vids available for that model. It doesn't look difficult at all. If the plan is to dispose/recycle the computer, it might be an interesting project to disassemble it and remove the drive. Then you can simply destroy it.

Google "iMac G4 teardown"

Dec 23, 2025 1:33 PM in response to aching

I can't open the CD drive (and so use an OS Install Disk).


It's not clear to me whether that means you are unable to open the tray or the media in the optical drive does not mount.


Holding an Option key on boot as D.I. Johnson suggested and described in Eject CDs and DVDs from your Mac - Apple Support is a good idea but it will only work if bootable media already exists in the tray. Instead, connect a wired (USB) mouse to the iMac, then start the Mac while pressing and holding that mouse button.


That action will cause the tray to open on startup.


  • On slot loading Macs, it causes the eject mechanism to cycle, ejecting anything in the drive.


  • That feature was included to force eject unreadable / unmountable media.


While I'm on the subject the Terminal command


drutil eject


... does the same thing. Of course the Mac has to be running first.

Dec 24, 2025 4:36 AM in response to John Galt

Well thanks, guys. I'll try the mouse trick and let you know. The HD is definitely failing. I started up in Target Mode and tried various combos of Treminal, Disk Utility and Disk Warrior. None of the operations completed which is a bit of a giveaway for a duff HD. But if I can open the CD drive, insert an OS Install Disk, and boot from it, I can demonstrate conclusively that the computer is OK, and 99% sure it'll confirm the HD needs replacing. A teardown vid will certainly help on that score. And then the hammer!!!!

Erase HD when both Disk Utility and Terminal fail.

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