making hfs files systems

Timothy A. Seufert yellowdog-general@lists.terrasoftsolutions.com
Wed Jul 10 12:30:01 2002


At 8:55 AM -0400 7/10/02, John Klinck wrote:
>   I would like to use a spare partition on my system disk as a way to transfer
>between macos and linux. I have looked all over for a means to create an hfs
>(not hfs plus) file system on this partition. I have looked around apple and
>various shareware archives for some sort of macos9 software to do 
>this. From the
>man pages, mkfs, fdisk, parted and so forth can not create hfs or hfs+ file
>systems.
>
>   system: Ti powerbook, tripleboot, ydl2.2
>
>   What software on macos9 (9.2) or macosX (10.1.5) can I use to create the hfs
>system?

You can do it under Linux using two tools, pdisk and hformat.

You will need to change the partition type to Apple_HFS.  Linux 
doesn't care that much about this, but MacOS won't see the HFS volume 
unless the partition type is correct.  You can do this with pdisk.  I 
think you have to delete the partition, then create it again using 
the version of the create command that allows you to type in your own 
partition type.  Use an existing HFS or HFS+ partition as a reference 
(the partition type for HFS and HFS+ is the same).

To actually format the partition, use hformat.  The man page is 
pretty self explanatory.


To read and write files while in Linux, I recommend NEVER mounting 
the HFS partition via the kernel's HFS driver.  Some people get lucky 
with it, but it is well known as being a buggy mess that can both 
corrupt the HFS filesystem and cause kernel panics.  (This because 
there hasn't been much maintenance done on the HFS filesystem driver 
in years; the kernel's internal interfaces to filesystems have 
changed a lot during that time, and the HFS driver has merely been 
hacked into at least compiling and loading, not really debugged.)

Instead, use the hfsutils package to copy data to and from the 
partition.  hformat is actually part of hfsutils.  "man hfsutils" 
will give general information on all the tools in the package.
-- 
Tim Seufert