Friday, October 14, 2005

Reformat Memory Card

Problem: The Compact Flash memory card (Type II, 2.2 Gig, named MAGICSTOR) in my camera refused to work in my camera or to mount under Mac OS X 10.3 or 10.4 or Windows XP one day, so I wanted to reformat it, to start over with a clean slate. (I only lost one picture, one that will be easy to shoot again.) Of course this happened when I was rushing to pack. How did my camera know I was leaving town? However, reformatting a drive that won't mount isn't easy. (DOS didn't do it.) Here's how I reformatted it anyway.

Warning: Be sure you know what you're doing before you run any of these Terminal commands yourself! You can guess that eraseDisk is dangerous, but newfs for a new file system isn't innocuous either.

Solution: First I opened Console (on my G4 MDD running 10.3.9), to read the error messages. This is a good place to start in general! From Console, I saw an error message about mounting disk3, which is all I needed to know to proceed! I ran this command in Terminal:

diskutil eraseDisk MS-DOS MAGICSTOR disk3

I could have named it anything up to 11 characters, not just MAGICSTOR. Again, it was disk3 in my case, but you'd need to be sure before trying this yourself!

After that, I was eager to see if this drive would work in my camera again. My camera offered to format it, so I did that. Otherwise I would have tried this next:

newfs_msdos -v MAGICSTOR -F 16 /dev/rdisk3s1

To write a new file system, you must use the rdisk ("real disk") instead of the interpreted disk. Since I made one partition, everything was on s1 ("slice 1"). The -F 16 formats it as a FAT16 partition, which is what I think digital cameras want.

No comments:

Post a Comment