3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Reformat Hidden Partitions on a Compact Flash disk on Mac osX

Reformat Hidden Partitions on a Compact Flash disk on Mac osX
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. ****


 
Remove these adsRemove these ads by Signing Up
 

Step 1When Disk Utility Won't Cut It Use diskutil

When Disk Utility Won\
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...
« Previous StepDownload PDFView All StepsNext Step »
6 comments
Jul 20, 2010. 4:18 PMMixMasterM says:
Another idea that comes to mind is to use dd to wipe the entire card, and then format it in the camera.
Jul 22, 2010. 8:46 AMMixMasterM says:
Yep, dd basically is "data duplicator" - 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 "device" 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 "of=" (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.
Jul 24, 2010. 6:19 PMMarble of Doom says:
I just tried dd if=/dev/zero of=/dev/disk1 on an old flashdrive but it says "Resource Busy" Any ideas?
Jul 25, 2010. 10:37 AMMixMasterM says:
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.
Jul 25, 2010. 7:41 AMMixMasterM says:
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.

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
21
Followers
12
Author:snotty
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 and Montreal.