mkfs.hfsplus: command not found

The hierarchical File System (HFS) was created by Apple for use on its Mac OS devices. It can be used on partitions as well as optical media. As of Mac OS X v10.6, HFS filesystems are read-only and cannot be created or updated. On Linux, HFS filesystems are read-only.

HFS+ is an extended HFS version created by Apple for use on its Mac OS devices. It can be used on partitions as well as optical media. HFS+ filesystems are read/write on Mac OS. On Linux, HFS+ filesystems are read-only, unless HFS+ journaling is disabled; then writing is allowed.

Noteworthy features of HFS+ include the following:

  • Unicode-based file/directory name encoding, with support for names containing up to 255 16-bit Unicode characters
  • A B+ Tree (the Catalog B-Tree) for storing the file system’s hierarchical structure, allowing tree-based indexing
  • Extent-based allocation of storage space using 32-bit allocation block numbers, with delayed allocation of physical blocks
  • A B+ Tree (the Extents Overflow B-Tree) for recording files’ “overflow” extents (the ninth and subsequent—for files with more than eight extents)
  • Multiple byte-streams (or forks) per file, with two predefined forks and an arbitrary number of other, named forks that are stored in a separate B-Tree (see next item).
  • A B+ Tree (the Attributes B-Tree) for storing arbitrary metadata per file, thus providing native support for extended file system attributes (the names of which are Unicode strings up to 128 16-bit Unicode characters in length)
  • Metadata journaling through the kernel’s VFS-level journaling mechanism
  • Multiple mechanisms to allow one file system object to refer to another: aliases, hard links, and symbolic links
  • An adaptive clustering scheme called Hot File Clustering for improving the performance of small, frequently accessed files
  • Dynamic relocation of small fragmented files—based on several conditions—to promote file contiguity
  • BSD-style file flags, allowing files to be designated as append-only, immutable, undeletable, and so on
  • Support for volume-level user and group quotas
  • Provision for storing Finder information in a file system object’s metadata, allowing per-file maintenance of properties such as file-extension hiding and color-coded labels
  • Provision for storing multiple timestamps per file system object, including an explicit creation date
  • Support for case sensitivity (although by default, HFS+ is case-preserving but not case-sensitive)
  • The dedicated Startup file, whose location is stored at a fixed offset in the volume header (allowing it to be found without having to know details of the volume format) and which can be used by a non–Mac OS X operating system to boot from an HFS+ volume
  • Support for byte-range and whole-file advisory locking

If you encounter an error on running the mkfs.hfsplus command:

mkfs.hfsplus: command not found

you may try installing the below packag as per your choice of distribution.

Distribution Command
Debian apt-get install hfsprogs
Ubuntu apt-get install hfsprogs
Kali Linux apt-get install hfsprogs
CentOS yum install hfsplus-tools
Fedora dnf install hfsplus-tools
Raspbian apt-get install hfsprogs

Conclusion

The HFS Plus file system (or simply HFS+) is the preferred and default volume format on Mac OS X. The term HFS stands for Hierarchical File System, which replaced the flat Macintosh File System (MFS) used in early Macintosh operating systems.

Related Post