Port-i386 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bootxx needs to fit within 0th track of MBR partition?



> I would expect the real issue is that we have a layout

>   mbr
>   disklabel
>   bootxx start
>   ...
>   bootxx end
>   [maybe some unused]
>   beginning of UFS

> and I dimly remember 16 sectors,

I'm fairly sure that, yes, the distance from "beginning of drive" to
"beginning of UFS" is 8K for UFS1, assuming of course that there is a
filesystem partition starting at start-of-disk.  With one sector
occupied by MBR and label, that left 7.5K for the bootblocks.

And, indeed, 5.2's sys/ufs/ffs/fs.h has a comment saying, in part,

 * Depending on the architecture and the media, the superblock may
 * reside in any one of four places. For tiny media where every block
 * counts, it is placed at the very front of the partition.  Historically,
 * UFS1 placed it 8K from the front to leave room for the disk label and
 * a small bootstrap. For UFS2 it got moved to 64K from the front to leave
 * room for the disk label and a bigger bootstrap, and for really piggy
 * systems we check at 256K from the front if the first three fail.

/~\ The ASCII				  Mouse
\ / Ribbon Campaign
 X  Against HTML		mouse%rodents-montreal.org@localhost
/ \ Email!	     7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B


Home | Main Index | Thread Index | Old Index