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 ? Could this be a potential cause of any problems ?
TIA, Nandini
***Every day is a new beginning..a brand new start, to bring joy and fulfilment to the sad and weary heart***
----- Original Message ----- From: Patrick Dirks To: Entwicklung Cc: darwin-development@lists.apple.com ; studentdev@lists.apple.com ; hfs-user@lists.mars.org 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.
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:
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 ?
Would be glad of any tips/suggestions ! -Nandini
***Every day is a new beginning..a brand new start, to bring joy and fulfilment to the sad and weary heart***