Create HFS+ and FAT32 partitions on one external drive.

Jun 17, '03 09:29:00AM

Contributed by: Anonymous

I've got an external FireWire 160G drive. The original intent was to use it for backups of my TiBook, and for moving files around between Windows, linux and Mac OS X systems. So, the obvious solution would be creating one backup partition with HFS+, and the rest of the space leave for FAT32 as the most common standard. I did some searching on the Internet, but it doesn't look like there is full solution for this problem posted ... so I did my own research and developed this procedure. To make it work, you need only OS X and Windows - no special software involved.

The idea is to create partitions on the target Windows system, and then format them on OS X.

Standard precaution - you'll work as root in terminal app, so you must be very careful. You can ruin the whole file system with just one wrong command! Read the rest of the hint for the process...

Procedure:

  1. Create two partitions in Windows (Windows2000 in my case), first for HFS+, second for FAT32. No need to format them.

  2. Connect drive to OS X. Befor switching drive on, run this command from terminal:
     ls /dev/rdisk?
    You'll get a list of current disks.

  3. Switch on the external drive. If OS X pops up with a window about initing new drive, press Ignore.

  4. Repeat the ls /dev/rdisk? command. Now you should see one more disk in the list. Remeber its number (i.e. rdisk2, I'll use this one in the examples).

  5. Type ls /dev/rdisk2*. You should get rdisk2s1 and rdisk2s2 - first is first partition, second is second partition.

  6. Run the following command, but change HFS_VOLUME_NAME to something informative for you:
     newfs_hfs -v HFS_VOLUME_NAME /dev/rdisk2s1
    When it's done, you now have an HFS+ partition.

  7. Run this command:
     newfs_msdos -v FAT_VOLUME_NAME -F 32 /dev/rdisk2s2
    Now you have a FAT32 partition. It's not limited to only 32gb -- I have 100gb, and it works at least with OS X 10.2.6.

  8. Powercycle the external drive.

  9. In my case, OS X picks up the FAT32 partition, but doesn't recognize HFS+ (what an irony). To mount the HFS+ partition (which will show the icon in the Finder), type this command:
     hdid /dev/disk2s1
    Pay attention - this time it's not rdisk2s1, but disk2s1.

  10. On Windows, go to the Disk Manager and assign some letter to the FAT32 drive. W2K works fine with partitions over 32gb; it just doesn't want to create them.
That's it!

[robg adds: I have not tested this one myself! Please heed the caution if you're going to try this one...]

Comments (67)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20030613121738812