Hi all,
Can anybody give me a judgement?? If i am creating a file which contains a HFS filesystem image which will be then written to a CD. THis image is not a Bootable Cd so should the file contain partition and boot block structures. Should i just write "zeros" in the first two sectors of the image (i.e. 512 *2 = 1024 bytes) in the file, and then write down the MDB structure in the image file after 1024 bytes??
Waiting for replies.. regards Biswaroop Banerjee
I'm not sure about the partition stuff, Floppy disks don't need partition info, so I'd guess you don't need it on a CD either, but I may be wrong. Both HFS and HFS+ state that the MDB (or VDB) must reside at sector 3 (sector 2 if you start with 0) and that sectors are 512 bytes. The bit before that should contain the device driver, for the hard disk, which I'm assuming will be ignored if its all zero's (and hence not bootable). My understanding is that a device may have a driver and not be bootable (as the system files are stored elsewhere in HFS+), in which case you're just loading a driver to read the disk. I guess that in HFS+ you could have no device driver, but still have a system file, and hence be bootable on modern macs. Its a pretty sure bet though that 0's indicate no driver and no bootable disk on HFS. Floppy disks have zeros for the first 2 sectors. Checkout flexiblebtree from sourceforge and look at the diskimage.img file, it is an example of a floppy disk as produced by a mac. Use the BinList application to list the first 3 sectors and you'll see 2 sectors of zeros and 1 with a MDB in it.
Simon
Biswaroop Banerjee wrote:
Hi all, Can anybody give me a judgement?? If i am creating a file which contains a HFS filesystem image which will be then written to a CD. THis image is not a Bootable Cd so should the file contain partition and boot block structures. Should i just write "zeros" in the first two sectors of the image (i.e. 512 *2 = 1024 bytes) in the file, and then write down the MDB structure in the image file after 1024 bytes?? Waiting for replies.. regards Biswaroop Banerjee
On Tuesday, February 26, 2002, at 06:51 AM, Simon Bazley wrote:
I'm not sure about the partition stuff, Floppy disks don't need partition info, so I'd guess you don't need it on a CD either, but I may be wrong.
I don't think you need the partition map as long as the volume isn't bootable, but I'm not absolutely certain. I don't happen to have any partitonless CDs lying around since all the ones I have are bootable.
Both HFS and HFS+ state that the MDB (or VDB) must reside at sector 3 (sector 2 if you start with 0) and that sectors are 512 bytes. The bit before that should contain the device driver, for the hard disk, which I'm assuming will be ignored if its all zero's (and hence not bootable).
Actually, that first 1024 bytes isn't a device driver. When it is non-zero, it contains code and data that the Mac OS ROM would use to boot from that volume. Filling it with zeroes ensures that the Mac OS ROM won't try to boot from it.
Device drivers, if any, would actually go in separate partitions whose type tells the system that the partition contains a driver.
-Mark