Filesystem - HFS

最後更新: 2016-03-15

 

HFS

* developed by Apple Inc
* it can also be found on read-only media such as CD-ROMs

HFS+

* Unicode (up to 255 UTF-16 characters in length)
* journaling (HFSJ)
* allocation block size under HFS is 16 KByte
* Maximum number of volumes:     No limit

Formerly, HFS Plus volumes were embedded inside an HFS standard filesystem. (phased out)

Structures

Sectors 0 and 1 of the volume are HFS boot blocks.
These are identical to the boot blocks in an HFS volume.

Sector 2 contains the Volume Header
stores a wide variety of data about the volume itself
 - the size of allocation blocks,
 - a timestamp that indicates when the volume was created
 - the location of other volume structures such as the Catalog File or Extent

The Allocation File (is stored as a regular file)
  Bitmap of which allocation blocks are free and which are in use.

The Catalog File (B-tree)
  records for all the files and directories stored in the volume.

The Extents Overflow File (B-tree)
   records the allocation blocks that are allocated to each file as extents.

The Attributes File (B-tree)
  Inline Data Attribute records
  Fork Data Attribute records
  Extension Attribute records

The Startup File is designed for non-Mac OS systems that don't have HFS or HFS Plus support.

The second to last sector contains the Alternate Volume Header

The last sector in the volume is reserved for use by Apple.

 


Install

 

apt-get install hfsplus hfsprogs

# Package: hfsplus

/usr/bin/hpmount
/usr/bin/hpumount
/usr/bin/hppwd
/usr/bin/hpcd
/usr/bin/hpls
/usr/bin/hpcopy
/usr/bin/hprm
/usr/bin/hpmkdir
/usr/bin/hpfsck

# Package: hfsprogs

/sbin/fsck.hfsplus
/sbin/mkfs.hfsplus

 


Check Kernel Support hfs

 

grep hfs /proc/filesystems

hfsplus

 

 


Usage: hpmount

 

opts

-r        mount the volume read-only.

-pn       mount partition number n.  ( Default is to mount the first partition )

Example

hpmount -r /dev/sdc2 /mnt/recovery/

 

 

Creative Commons license icon Creative Commons license icon