HFS

The Hierarchical File System (HFS) is Article description::the native filesystem of the Apple Macintosh and its operating system up to Mac OS 8. It was the primary base filesystem of the Macintosh on the Motorola 68000 architecture. Its successor is HFS+ and became the standard base filesystem in Mac OS 8.1 on PowerPC as well as Mac OS X on PowerPC and Intel x86. However, on PowerPC-based Macs a HFS partition is still used for the bootstrap partition.

Emerge
The package traditionally provides means to access the Hierarchical File System on m68k and ppc/ppc64 Macs. The included utilities provide limited access to a filesystem on a selected partition.

Instead of mounting the filesystem as a subfolder under the root directory, the various utilities of package access the filesystem directly. hmount selects the partition for theese utilities and humount releases it again. The use of is highly recommended.

Select the partition with hmount.

On the selected partition, the commands h[format|vol|fsck|ls|dir|pwd|mkdir|cd|rmdir|attrib|copy|rename|del] can be used for file and filesystem operations.

This will copy a file from the Linux filesystem to the HFS volume. The utilities will automatically determain if the source or target is on the HFS volume or the Linux filesystem, thus the pathname should be unambiguous and use the slash "/" for linux and the colon ":" for HFS.

The partition is released with the humount utility.

NewWorld Bootblock
A specialty of the PowerPC-based NewWorld Macs is the use of a NewWorld Bootblock for yaboot or GRUB. NewWorld Macs are PowerPC-based Macs with Open Firmware version 3.0 (OF3) or later. OF3+ will automatically look for bootable partitions, like those of the type Apple_Boot. When such a partition contains a filesystem of the type HFS, and this filesystem contains a "blessed" file, this file will be selectable as a boot option from OF3+.

First, a NewWorld Bootblock has to be created using mac-fdisk:

At the interactive command prompt this partition can either be created manually e.g. by using the C command for "create new partition, specifying the partition type", or semi-automatic by using the b command for "create new 800k Apple_Bootstrap partition (used by yaboot)". Either way you should get a bootable HFS partition of either the type Apple_Boot or Apple_Bootstrap. Assuming this partition is /dev/sda2, to bless a bootloader such as yaboot or GRUB, hattrib can be used.

External resources

 * HFS+ - from the Arch Linux wiki