Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Need Terminal Command to Erase External HD

I used the Disk Utility to partition an external Western Digital hard drive with one
partition for the Time Machine and the other for SuperDuper. Something happened
when the Disk Utility made the partitions. Now the two empty partitions show up
on the desktop but the Disk Utility cannot do anything. I suspect the directory is
hosed. The DU cannot Repair or even Erase the external drive. The DU hangs (does
not respond) and I have to use Force Quit. FYI, DU fails when it tried to unmount
the partitions.

I am not very skilled in terminal commands and would appreciate some specific
commands to Erase the external WD hard drive. When I open the terminal it has
me at the user level. What is the command to view the external drive, then what
command is needed to ERASE it. Once erased I think the Disk Utility should be
able to do its thing.

All of this needed to create a Time Machine backup drive

24" iMac 2.4 GHz-4 GB and 13-Inch MacBook Pro, Mac OS X (10.6.3)

Posted on Apr 18, 2010 6:52 PM

Reply
12 replies

Apr 18, 2010 7:20 PM in response to Pondini

Select the top line for the drive in DU's sidebar, click the Partition tab, then
use the Current pop-up menu to select 1 Partition, and click Options and select GUID.


I tired that before making the posting. When I click on partition, it cannot unmount
either partition and DU hangs (does not respond).

I would like to jump start the drive from the terminal if possible. Maybe I need a 3rd
party utility to fix what DU hosed? Again, I suspect the director his hosed.

Apr 18, 2010 7:32 PM in response to aRKay

aRKay wrote:
Select the top line for the drive in DU's sidebar, click the Partition tab, then
use the Current pop-up menu to select 1 Partition, and click Options and select GUID.


I tired that before making the posting. When I click on partition, it cannot unmount
either partition and DU hangs (does not respond).


Try booting up from your Install disc and using it's copy of Disk Utility. (Boot from the disc, select your language, then on the next screen select Utilities in the Menubar, then +Disk Utility).+

I would like to jump start the drive from the terminal if possible.


II'm not well-versed in UNIX. You might get some help with that in the UNIX forum, in the +Mac OSX Technologies+ forum, at: http://discussions.apple.com/forum.jspa?forumID=735

Maybe I need a 3rd party utility to fix what DU hosed? Again, I suspect the director his hosed.


+Disk Warrior+ is thought by many to be the "gold standard" of such apps, and as probably a good investment, but is about $100. Whether it can fix this, I have no idea.

Apr 19, 2010 6:24 AM in response to Donald Palmer

Stick your system disk in and run DU from it.


I did and it worked! Running the Disk Utility from the MBP install disk let
me mess with the weird external drive. Very interesting results. It would let
me erase and create a single partition but when I asked it to create two
partitions only one would pass the Repair. I did it three times and finally
gave up and decided the Seagate 200 GB SATA drive just would not partition.

I finally did 1 partition and have SuperDuper doing its thing on the MBP
while I am typing this note on the iMac.

Must just be a weird hard drive. Stay tuned to see what happens

Thanks for the tip to use the Disk Utility form the Install disk!

Apr 20, 2010 2:04 PM in response to aRKay

Hi aRKay:
For future reference here is the terminal commands you need:

Boot into your install disk

open terminal.app

at the prompt:
diskutil list
(press enter)
that will give you the BSD device name of your drive.
example "disk0".

next command:
diskutil unmount force /dev/<disk_name>
example:
diskutil unmount force /dev/disk0

next command:
diskutil zeroDisk /dev/<disk_name>
example:
diskutil zeroDisk /dev/disk0
(press return)

After disk is zeroed, you may resume normal partitioning.
#

Of course if your disk is indeed going bad, then efforts to fix it will be fruitless.

These instructions were written for internal disks, however, disk name may vary a little.
It may be "rdisk1" or something similar. Also, booting into the install disks may not be
necessary in order to manipulate External Drives or internal data only (non boot) drives.
In other words, any drive, other than the boot drive can usually be serviced without having
to be booted from the Install Disks.

Note: when booted from install disks, names may be Case Sensitive.

Kj ♘

Apr 20, 2010 4:54 PM in response to KJK555

Thanks for the terminal commands. Good idea and suggestion but it
did not work, It came back with unmount failed for dev. Just like the
Disk Utility could not unmount the suspect drive. I picked up a replacement
hard drive today and it works. The old Seagate 200 GB (suspect) is now
a good door stop. Maybe I should shoot it!

Thanks for all of the help. When a drive goes bad, they really go bad.

I have saved your terminal commands for the next time.

Aug 1, 2010 1:58 PM in response to KJK555

Hi Kj, I was following this thread you responded to as I erased my hard drive as a read only Apple DVD OS X10 6.2 installer DVD in error. IT'S READ ONLY. So I can't repair or erase. I have another Imac but I can't seem to figure out how to restore from that either.
I can see hard drive in 'Disc utility but it wont let me repair or erase now. I'm trying to fix this now in terminal. I used your codes and retrieved name and disc but this was response " bash error syntex error near unexpected token line. Is there something Im not doing correctly .Please advise I would greatly aprreciate your knowledge on this. Thanks

Need Terminal Command to Erase External HD

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