With very little motivation left to keep this project alive, I'm looking for a volunteer who can take it over. Until I find one, new releases of HFS for FreeBSD will be as likely as the rain in the desert. Sorry.
HFS stands for the Hierarchical File System. HFS and HFS Plus are the filesystem formats of Apple MacOS. While the older one, HFS, may look rather limited today, HFS Plus includes most of the capabilities one can find in UFS or Berkeley FFS: long file names, hard and soft links, special nodes, owner and group information, access permissions.
Additionally, both HFS and HFS Plus have a number of interesting features not found in UFS:
Apple has recently released the original HFS kernel and userland code (incl. HFS Plus) under the Apple Public Source License [APSL] as a part of Darwin, which created a nice opportunity to port it to FreeBSD.
HFS and HFS Plus in FreeBSD may be of particular value to parties interested in sharing filesystem resources over a network from FreeBSD to MacOS, because there will be no need to emulate HFS-specific features unlike in the case of FFS backing store.
Henceforth the term "HFS" will cover both HFS and HFS Plus unless explicitly specified otherwise. To avoid misreading, the old HFS format will be denoted as "plain HFS."
The term "port" used throughout this document means only that the HFS code has been ported from Darwin to FreeBSD; it has nothing to do with FreeBSD ports and packages (yet.)
This port is based on the Darwin source code. It's legal to use or develop it as long as the APSL terms are kept.
This port should be considered highly experimental and therefore used with caution. Neither Apple nor the maintainer of this port will take responsibility for data loss or damage that might result from using this piece of software.
This port consists of the following functional parts:
Via HTTP from this site:
Your system should be at least as new as 5.0-RELEASE.
To use MacOS-formatted disks, you will need
FreeBSD-CURRENT as fresh as of the 24th of February, 2003
(5.1-RELEASE will do);
otherwise this port's usability will be limited
to HFS volume images and volumes created within IBM
PC (MBR) partitions. To enable support of the MacOS disk
format on architectures other that PowerPC, you will need
to rebuild your kernel with the option GEOM_APPLE
.
This option is always enabled on the PowerPC
architecture. In -CURRENT, it is also available as
a loadable module called geom_apple
since the 31st of May, 2003.
The kernel source must be installed at
/usr/src/sys.
The source code of mount(8)
must be
installed at /usr/src/sbin/mount.
# tar xzf hfs-freebsd-xx.tar.gz
# cd hfs-freebsd-xx
# make
# make install
# mount -t hfs /dev/da0s3 /mnt
The GEOM_APPLE module will allocate the first slice of a MacOS-formatted disk to the partition map itself since the latter is self-contained. The first of conventional partitions will appear at slice 2. That partition may contain drivers or auxiliary data instead of a disk volume; GEOM_APPLE can't distinguish between them yet. You may have to look at the beginning of a partition with hexdump(1) to tell if it's an HFS volume—a 'BD' or 'H+' signature must appear at offset 0x400. On the other hand, it's all right to try to mount an obscure partition as an HFS volume; the driver will simply refuse it if it's not HFS.
If you have an iPod formatted for Mac, you can access its files from FreeBSD as well. Eirik Oeverby <ltning at anduin dot net> reports that it's possible to connect an iPod to a FreeBSD host through FireWire. Of course, you'll need to load the FireWire driver in advance.
The entire disk of your iPod will be accessible as
/dev/daX
, where X
is a number
assigned to this new device upon plugging it.
The GEOM_APPLE module will further split the disk into
/dev/daXs1
, a partition map partition
(yes, it's self-contained); /dev/daXs2
,
a firmware partition; and /dev/daXs3
,
an HFS Plus volume partition. Obviously, you should
mount the latter.
Eirik also reports that he had been unable to mount the HFS volume of his iPod until he took his chance with repairing it using the port of fsck_hfs. Beware of iPod firmware bugs silently eating the file system!
Note that you'll need software to manage the iTunes database on your iPod, or else audio files uploaded won't show up in your iPod playlist. There's a number of open-source projects around dedicated to that. Look for myPod, gtkPod, or whatever.
Thank Apple for taking the open-source way.
This work was initially sponsored by the KDS Ratmir company.
The original location of this page is here.
$Id: index.html,v 1.8.2.5 2004/08/31 07:00:46 yar Exp $