[hfs-user] Wrapper and Readme

Mark Day mday@apple.com
Fri, 3 May 2002 07:56:11 -0700


On Friday, May 3, 2002, at 01:44 AM, Entwicklung wrote:

>                       Thanks to the friendly feedback I got I managed to get started off with including an HFS-Wrapper in my code. It seems to work ok now but I'm not too sure... I only have access to an iMac with MacOS 9 - my HFS+ Volume gets displayed but how do I get to verify if the ReadMe I'm creating in the Wrapper is ok ? The volume is recognized as an HFS+ Volume (since the embedded volume seems to be getting mounted directly) and I can do a GetInfo on it. Do I necessarily need an older Mac which doesn't support HFS+ to get to see the ReadMe ?

Probably the most convenient way is to change the drEmbedSigWord in the MDB.  That will prevent the File Manager from recognizing it as an HFS Plus volume.  It you don't want to burn another CD, then just make a disk image (use Disk Copy to make a read/write image so it will be a block-for-block copy) and use some file editor to change the signature.  Then mount the image, and you should see the wrapper.  If you're planning on verifying the disk using Disk First Aid or Disk Utility, you should also change the signature in the alternate MDB.

> I have one more question - Is it possible to have a Wrapper for HFS-volumes as well  - embedding an HFS-volume within another HFS-Volume ? I guess this wouldn't have any benefits as such but theoretically it should be possible, right ?

Theoretically, the mechanism could be extended to include embedded things other than HFS Plus.  That's the point of the drEmbedSigWord field in the MDB.  However, there is no standard for any value other than 'H+', and no implementation that I know of would mount any other embedded volume.

The embedded extent is NOT treated like any old generic partition.  Since HFS and HFS Plus volumes are so similar, a single filesystem plug-in handles both kinds of volumes (much like a single plug-in would handle FAT12, FAT16 and FAT32).  It is inside that plug-in that the embedded volume is handled.  It reads the block where the MDB should be.  If it looks like an MDB, and the drEmbedSigWord is set to 'H+', and there is a Volume Header 1024 bytes from the start of the embedded extent, then the volume is recognized as (wrapped) HFS Plus.

-Mark