Hammer bootloader

Matthew Dillon dillon at apollo.backplane.com
Mon Aug 25 17:48:06 PDT 2008


:Hey,
:
:seems I have finished hammer bootloader support (currently only boot2,
:loader should be easy).  However the problem is that boot2 now exceeds
:its size by 580 bytes.  This is a retarded limit, but what can you do.
:
:While probing around I realized that hammer fs can't be installed at
:offset 0 in disklabel, could that be?  Where is that documented and who
:keeps me from doing that?
:
:Anyways, this boot stuff is big time frustrating because there are so
:many constants intertwingled.  I have no idea why my code currently
:doesn't boot -- it doesn't even reach boot2's main().
:
:cheers
:    simon

    The main issue is making room for boot0/boot1/boot2.  32 bit disklabels
    overload the disklabel and boot storage with 'sector 0', so partitions
    starting at 'sector 0' have an overlap issue.

    UFS takes care of this by not writing anything into the first 8K of
    its partition.

    HAMMER doesn't do this.  HAMMER writes to the first 8K of its 
    partition.

    So when using 32 bit disklabels a HAMMER boot partition must start
    at sector 16 at least.

    64 bit disklabels specify their partition ranges out of band, but I
    do not remember if I also leave room for the boot1/boot2 stuff.  If I
    don't then we should change the 64 bit disklabel format to leave
    sufficient room.   So with a 64 bit disklabel the filesystem can start
    at '0' because '0' is not really 0.

					-Matt
					Matthew Dillon 
					<dillon at backplane.com>





More information about the Kernel mailing list