[hfs-user] HFS-Plus and Wrappers

Entwicklung entwicklung@whengenibk.de
Thu, 2 May 2002 09:13:07 +0200


This is a multi-part message in MIME format.

------=_NextPart_000_000C_01C1F1B9.92F50720
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Thanks for the reply !
Regarding 'bad blocks' - I haven't really marked any 'bad blocks' until =
now and am not too sure I know how it is done... will have to read up on =
that. Any idea what happens if I don't mark the blocks of the embedded =
volume as 'bad blocks' but just mark them as allocated in the allocation =
bitmap of the HFS-Wrapper ?=20
Could this be a potential cause of any problems ?

TIA,
Nandini =20


***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***

  ----- Original Message -----=20
  From: Patrick Dirks=20
  To: Entwicklung=20
  Cc: darwin-development@lists.apple.com ; studentdev@lists.apple.com ; =
hfs-user@lists.mars.org=20
  Sent: Thursday, May 02, 2002 9:13 AM
  Subject: Re: [hfs-user] HFS-Plus and Wrappers


  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,
                       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.
    =20
    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:
    =20
    1) these 5 files are 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 ?
    =20
    Would be glad of any tips/suggestions !
    -Nandini
    =20
    =20
    ***Every day is a new beginning..a brand new start, to bring joy and =
fulfilment to the sad and weary heart***


------=_NextPart_000_000C_01C1F1B9.92F50720
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-1" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2920.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Thanks for the reply !</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Regarding 'bad blocks' - I haven't =
really marked=20
any 'bad blocks' until now and am not too sure I know how it is done... =
will=20
have to read up on that. Any idea what happens if I don't mark the =
blocks of the=20
embedded volume as 'bad blocks' but just mark&nbsp;them as allocated in =
the=20
allocation bitmap of the HFS-Wrapper ? </FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Could this be a potential cause of any =
problems=20
?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>TIA,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Nandini&nbsp; </FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>***Every day is a new beginning..a =
brand new start,=20
to bring joy and fulfilment to the sad and weary =
heart***<?/smaller><?/fontfamily><BR></FONT></DIV>
<BLOCKQUOTE=20
style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: =
0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">
  <DIV style=3D"FONT: 10pt arial">----- Original Message ----- </DIV>
  <DIV=20
  style=3D"BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: =
black"><B>From:</B>=20
  <A href=3D"mailto:pwd@apple.com" title=3Dpwd@apple.com>Patrick =
Dirks</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>To:</B> <A=20
  href=3D"mailto:entwicklung@whengenibk.de"=20
  title=3Dentwicklung@whengenibk.de>Entwicklung</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Cc:</B> <A=20
  href=3D"mailto:darwin-development@lists.apple.com"=20
  =
title=3Ddarwin-development@lists.apple.com>darwin-development@lists.apple=
.com</A>=20
  ; <A href=3D"mailto:studentdev@lists.apple.com"=20
  title=3Dstudentdev@lists.apple.com>studentdev@lists.apple.com</A> ; <A =

  href=3D"mailto:hfs-user@lists.mars.org"=20
  title=3Dhfs-user@lists.mars.org>hfs-user@lists.mars.org</A> </DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Sent:</B> Thursday, May 02, 2002 =
9:13=20
AM</DIV>
  <DIV style=3D"FONT: 10pt arial"><B>Subject:</B> Re: [hfs-user] =
HFS-Plus and=20
  Wrappers</DIV>
  <DIV><BR></DIV>1. You'll probably need at least 3: the ReadMe (or =
whatever=20
  file you like to have shown) and the Desktop DB and Desktop DF. The =
latter two=20
  are there to make the Finder happy; if they're not present the Finder =
will try=20
  to create them and will end up creating them somewhere in the bowels =
of=20
  whatever system happens to be running because they can't be created on =
the=20
  read-only disk. The wrapper also has no space available, typically. =
Altogether=20
  much better to have a skeleton Desktop DB and Desktop DF there. You =
can copy=20
  them from any freshly initialized HFS floppy: the Desktop DB will have =
a few=20
  blocks of valid data in a small file, the Desktop DF file should be =
zero=20
  length in all likelihood.<BR><BR>I'm not entirely sure why the System =
and=20
  Finder files are there; they might be there to placate simple-minded =
software=20
  that checks for them when deciding whether the volume is potentially =
bootable.=20
  If your wrapped HFS+ volume is unbootable anyway, I bet you can get =
away=20
  without them.<BR><BR>2. Yes, there are two completely unrelated sets =
of=20
  Desktop DB and Desktop DF files. The ones in the wrapper are =
ordinarily=20
  ignored because it's the "wrapped" HFS+ volume that's actually =
mounted. The=20
  ones in the wrapper can be empty - their content is largely=20
  irrelevant.<BR><BR>3. The ReadMe file is stored as an ordinary file on =
a plain=20
  HFS volume. Nothing special (that's the whole point - it's there for =
the=20
  consumption of systems that only know about HFS).<BR><BR>4. You can =
not only=20
  write anything you like in the ReadMe file, you can call the file =
anything you=20
  want, have anything else you want besides (wanna throw in a QuickTime =
movie of=20
  yourself? No problem!). It's strictly cosmetic, solely for the benefit =
of the=20
  poor human who suddenly can't find the hard drive's contents on this=20
  system.<BR><BR>The most interesting part of the wrapper volume is the =
pointer=20
  to the HFS+ volume embedded. I believe the blocks used by the HFS+ =
volume are=20
  usually specified as used up by the "Bad block" file on the wrapper =
volume, so=20
  the wrapper volume looks like a large volume with a few files, no free =
space,=20
  and a ton of bad blocks.<BR><BR>Hope that helps,<BR>-Pat =
Dirks.<BR><BR>On=20
  Wednesday, May 1, 2002, at 11:46 PM, Entwicklung wrote:<BR><BR>
  <BLOCKQUOTE><?fontfamily><?param Arial><?smaller>Hello =
Listers,<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nb=
sp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;=20
    Recently there was a bit of discussion on HFS-Wrappers on the =
hfs-user=20
    mailing list and how it allows a computer with HFS (but no HFS Plus =
support)=20
    to start up or display a ReadMe to the user to improve the =
user-experience.<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>The=20
    tech. notes (TN 1150: HFS Plus Volume Format) says that the HFS =
wrapper=20
    volume contains five files in the root folder - a ReadMe, System and =
Finder,=20
    Desktop DB and Desktop =
DF.<?/smaller><?/fontfamily><BR>&nbsp;<BR><?fontfamily><?param =
Arial><?smaller>I'm=20
    a third-party developer creating an HFS-Plus volume (non-bootable)=20
    interested in extending the functionality of my HFS-Plus volume to =
include a=20
    Wrapper as well. I want to know=20
    whether:<?/smaller><?/fontfamily><BR>&nbsp;<BR><?fontfamily><?param =
Arial><?smaller>1)&nbsp;these=20
    5 files&nbsp;are actually necessary or it would suffice if only the =
ReadMe=20
    is present ?<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>2) would=20
    this mean that the Desktop DB and DF files would be present twice =
(on an=20
    Apple-initialized volume) ? - once in the HFS-Wrapper and once in =
the=20
    HFS-Plus catalog ?<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>3) is=20
    there any documentation from Apple which describes how this ReadMe =
file is=20
    stored up in the Wrapper's catalog (I gathered it's not hidden) in =
order to=20
    function as expected ?... =
reverse-engineering<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>can=20
    be painful =
sometimes..<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>4)=20
    are the contents of the ReadMe file fixed or could I write anything =
I want=20
    into it ?<?/smaller><?/fontfamily><BR>&nbsp;<BR><?fontfamily><?param =
Arial><?smaller>Would=20
    be glad of any tips/suggestions =
!<?/smaller><?/fontfamily><BR><?fontfamily><?param =
Arial><?smaller>-Nandini<?/smaller><?/fontfamily><BR>&nbsp;<BR>&nbsp;<BR>=
<?fontfamily><?param Arial><?smaller>***Every=20
    day is a new beginning..a brand new start, to bring joy and =
fulfilment to=20
    the sad and weary=20
heart***<?/smaller><?/fontfamily><BR></BLOCKQUOTE></BLOCKQUOTE></BODY></H=
TML>

------=_NextPart_000_000C_01C1F1B9.92F50720--