[hfs-user] HFS-Plus and Wrappers

Patrick Dirks pwd@apple.com
Thu, 2 May 2002 00:13:21 -0700


--Apple-Mail-1--933271002
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=ISO-8859-1;
	format=flowed

1. You'll probably need at least 3: the ReadMe (or whatever file you =
like to have shown) and the Desktop DB and Desktop DF.  The latter two =
are there to make the Finder happy; if they're not present the Finder =
will try to create them and will end up creating them somewhere in the =
bowels of whatever system happens to be running because they can't be =
created on the read-only disk.  The wrapper also has no space available, =
typically.  Altogether much better to have a skeleton Desktop DB and =
Desktop DF there.  You can copy them from any freshly initialized HFS =
floppy: the Desktop DB will have a few blocks of valid data in a small =
file, the Desktop DF file should be zero length in all likelihood.

I'm not entirely sure why the System and Finder files are there; they =
might be there to placate simple-minded software that checks for them =
when deciding whether the volume is potentially bootable.  If your =
wrapped HFS+ volume is unbootable anyway, I bet you can get away without =
them.

2. Yes, there are two completely unrelated sets of Desktop DB and =
Desktop DF files.  The ones in the wrapper are ordinarily ignored =
because it's the "wrapped" HFS+ volume that's actually mounted.  The =
ones in the wrapper can be empty - their content is largely irrelevant.

3. The ReadMe file is stored as an ordinary file on a plain HFS volume.  =
Nothing special (that's the whole point - it's there for the consumption =
of systems that only know about HFS).

4. You can not only write anything you like in the ReadMe file, you can =
call the file anything you want, have anything else you want besides =
(wanna throw in a QuickTime movie of yourself?  No problem!).  It's =
strictly cosmetic, solely for the benefit of the poor human who suddenly =
can't find the hard drive's contents on this system.

The most interesting part of the wrapper volume is the pointer to the =
HFS+ volume embedded.  I believe the blocks used by the HFS+ volume are =
usually specified as used up by the "Bad block" file on the wrapper =
volume, so the wrapper volume looks like a large volume with a few =
files, no free space, and a ton of bad blocks.

Hope that helps,
-Pat Dirks.

On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:

> Hello Listers,
> =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Recently there =
was a bit of discussion on HFS-Wrappers on the hfs-user mailing list and =
how it allows a computer with HFS (but no HFS Plus support) to start up =
or display a ReadMe to the user to improve the user-experience.
> The tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper volume contains five files in the root folder - a ReadMe, System =
and Finder, Desktop DB and Desktop DF.
> =A0
> I'm a third-party developer creating an HFS-Plus volume (non-bootable) =
interested in extending the functionality of my HFS-Plus volume to =
include a Wrapper as well. I want to know whether:
> =A0
> 1)=A0these 5 files=A0are actually necessary or it would suffice if =
only the ReadMe is present ?
> 2) would this mean that the Desktop DB and DF files would be present =
twice (on an Apple-initialized volume) ? - once in the HFS-Wrapper and =
once in the HFS-Plus catalog ?
> 3) is there any documentation from Apple which describes how this =
ReadMe file is stored up in the Wrapper's catalog (I gathered it's not =
hidden) in order to function as expected ?... reverse-engineering
> can be painful sometimes..
> 4) are the contents of the ReadMe file fixed or could I write anything =
I want into it ?
> =A0
> Would be glad of any tips/suggestions !
> -Nandini
> =A0
> =A0
> ***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***

--Apple-Mail-1--933271002
Content-Transfer-Encoding: quoted-printable
Content-Type: text/enriched;
	charset=ISO-8859-1

1. You'll probably need at least 3: the ReadMe (or whatever file you
like to have shown) and the Desktop DB and Desktop DF.  The latter two
are there to make the Finder happy; if they're not present the Finder
will try to create them and will end up creating them somewhere in the
bowels of whatever system happens to be running because they can't be
created on the read-only disk.  The wrapper also has no space
available, typically.  Altogether much better to have a skeleton
Desktop DB and Desktop DF there.  You can copy them from any freshly
initialized HFS floppy: the Desktop DB will have a few blocks of valid
data in a small file, the Desktop DF file should be zero length in all
likelihood.


I'm not entirely sure why the System and Finder files are there; they
might be there to placate simple-minded software that checks for them
when deciding whether the volume is potentially bootable.  If your
wrapped HFS+ volume is unbootable anyway, I bet you can get away
without them.


2. Yes, there are two completely unrelated sets of Desktop DB and
Desktop DF files.  The ones in the wrapper are ordinarily ignored
because it's the "wrapped" HFS+ volume that's actually mounted.  The
ones in the wrapper can be empty - their content is largely irrelevant.


3. The ReadMe file is stored as an ordinary file on a plain HFS
volume.  Nothing special (that's the whole point - it's there for the
consumption of systems that only know about HFS).


4. You can not only write anything you like in the ReadMe file, you
can call the file anything you want, have anything else you want
besides (wanna throw in a QuickTime movie of yourself?  No problem!).=20
It's strictly cosmetic, solely for the benefit of the poor human who
suddenly can't find the hard drive's contents on this system.


The most interesting part of the wrapper volume is the pointer to the
HFS+ volume embedded.  I believe the blocks used by the HFS+ volume
are usually specified as used up by the "Bad block" file on the
wrapper volume, so the wrapper volume looks like a large volume with a
few files, no free space, and a ton of bad blocks.


Hope that helps,

-Pat Dirks.


On Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:


<excerpt><fontfamily><param>Arial</param><smaller>Hello =
Listers,</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=
=A0=A0=A0=A0=A0=A0=A0 Recently
there was a bit of discussion on HFS-Wrappers on the hfs-user mailing
list and how it allows a computer with HFS (but no HFS Plus support)
to start up or display a ReadMe to the user to improve the
user-experience.</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>The tech. notes (TN 1150: HFS
Plus Volume Format) says that the HFS wrapper volume contains five
files in the root folder - a ReadMe, System and Finder, Desktop DB and
Desktop DF.</smaller></fontfamily>

=A0

<fontfamily><param>Arial</param><smaller>I'm a third-party developer
creating an HFS-Plus volume (non-bootable) interested in extending the
functionality of my HFS-Plus volume to include a Wrapper as well. I
want to know whether:</smaller></fontfamily>

=A0

<fontfamily><param>Arial</param><smaller>1)=A0these 5 files=A0are =
actually
necessary or it would suffice if only the ReadMe is present =
?</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>2) would this mean that the
Desktop DB and DF files would be present twice (on an
Apple-initialized volume) ? - once in the HFS-Wrapper and once in the
HFS-Plus catalog ?</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>3) is there any documentation
from Apple which describes how this ReadMe file is stored up in the
Wrapper's catalog (I gathered it's not hidden) in order to function as
expected ?... reverse-engineering</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>can be painful =
sometimes..</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>4) are the contents of the
ReadMe file fixed or could I write anything I want into it =
?</smaller></fontfamily>

=A0

<fontfamily><param>Arial</param><smaller>Would be glad of any
tips/suggestions !</smaller></fontfamily>

<fontfamily><param>Arial</param><smaller>-Nandini</smaller></fontfamily>

=A0

=A0

<fontfamily><param>Arial</param><smaller>***Every day is a new
beginning..a brand new start, to bring joy and fulfilment to the sad
and weary heart***</smaller></fontfamily>

</excerpt>=

--Apple-Mail-1--933271002--