loading
Here is one way to get rid of stubborn partitions. There are some kinds of partitions that Disk Utility in Mac osX won't show you because it's stupid.

Briefly a bit of background: I got an ipod 3rd generation for free because the battery was dead. I installed a new battery and somehow killed the ancient hard drive. I replaced the hard drive with a compact flash card (make sure it is ATA-compliant or you will enter a world of pain) using a 1.8 adapter.

Anyway, it seemed to work at first but something got a bit weird with the card and I couldn't reformat it with Disk Utility.

Before you read on, try putting the CF card in a digital camera and formatting it with that.

I don't have an appropriate camera and more sophisticated disk software cost money so I went oldschool and looked for command-line software. As it turns out there is a great program called diskutil included in the Terminal (aka the mac osX command prompt).

diskutil showed me the hidden partitions and helped me reformat them. And it was free.

Here is how I did it.

**** The iPod is still giving me some trouble so this may not work for you. It sort-of works for me but not every time. ****


Step 1: When Disk Utility Won't Cut It Use Diskutil

Yes, diskutil.

Materials:
a compact flash card reader (a USB one in my case)
a mac runnning osX (version 10.6 in my case)

Open up your Terminal: Applications/Utilities/Terminal

Type in: diskutil list

This will tell diskutil to show you all the partitions on all the drives on your computer, including the CF card in your card reader.

I think there is even one more little partition that diskutil neglected to show me...

Step 2: Format That Pesky Partition

Now that we know which partition we want to wipe clean, let's do it!

Still in the Terminal, type in: diskutil eraseVolume hfs+ woot disk1s1

diskutil is the program of course.
eraseVolume is the command for diskutil.
hfs+ is the file system or format that I chose arbitrarily. I think diskutil can write many formats.
woot is the new name of the partition.
disk1s1 is the identifier for the target partition. It took me a while to figure that one out.

And that's all folks.

Now to find what caused the partition to get all freaky in the first place...
<p>suggest:<br>1. $ sudo su<br>2. $ umount -f /Volumes/rei (&quot;rei&quot; being the partition given in the example) <br>3. $ diskutil eraseVolume hfs+ woot disk1s1 </p>
<p>Getting Error - &quot;Error: -69874: Couldn't modify partition map&quot;<br></p><p>Might be incorrect file system name. Please help me to convert these partition to normal partititon.</p>
Another idea that comes to mind is to use dd to wipe the entire card, and then format it in the camera.
Sounds interesting. Can you tell me how to wipe a card using dd? All I can find about dd is that it's for copying. How do I erase with it?
Yep, dd basically is &quot;data duplicator&quot; - i.e. copy. But, the trick is what data do you copy? If you copy all zeroes onto something, you essentially erase it. Most modern Unixes, including OS X have a special &quot;device&quot; that generates an endless stream of zeros. From a commandline, you find it at /dev/zero There is also a random number generator at /dev/random Anyway, so what you do is tell dd to use /dev/zero as the input and then the output is your USB connected flash card. I don't have a flash reader here at work, so I can't tell you for sure, but from memory, the command would look something like: dd if=/dev/zero of=/dev/disk4 You need to find-out what disk# your flash card appears as and use that. You also need to be careful with dd because if you specify the wrong disk in the &quot;of=&quot; (output file) then it will happily pave your system disk or whatever else you specify. Anyway, that's the quick rundown from memory. It should be enough to help you get looking into dd if you want to.
I just tried dd if=/dev/zero of=/dev/disk1 on an old flashdrive but it says &quot;Resource Busy&quot; Any ideas?
Repost since the Reply didn't actually reply in the correct spot. Make sure the disk is not mounted on the desktop. Open Disk Utility and select the flash drive and hit unmount. Then retry the dd.
Make sure the disk is not mounted on the desktop. Open Disk Utility and select the flash drive and hit unmount. Then retry the dd.

About This Instructable

25,300views

2favorites

Bio: Careers: documentary filmmaker, DOP, engineering student, practical environmentalist, idealist. Loves: bicycles and when weeds grow in the city. I'm from western Canada, Yukon, Japan ... More »
More by snotty:Copy the Canadian Belt Knife Cheapo Injection Molding With Gluegun Tattoo Your Laptop 
Add instructable to: