--- src/sys/kern/subr_diskslice.c 2007/05/20 04:41:58 1.39 +++ src/sys/kern/subr_diskslice.c 2007/05/20 19:23:33 1.40 @@ -1345,7 +1345,17 @@ set_ds_label(struct diskslices *ssp, int */ if (slice != WHOLE_DISK_SLICE) { if (lp) { - sp1->ds_skip_bsdlabel = sp1->ds_skip_platform + 15; + /* + * leave room for the disklabel and boot2 - + * traditional label only. XXX bad hack. Such + * labels cannot install a boot area due to + * insufficient space. + */ + int lsects = SBSIZE / ssp->dss_secsize - + sp1->ds_skip_platform; + if (lsects <= 0) + lsects = 1; + sp1->ds_skip_bsdlabel = sp1->ds_skip_platform + lsects; if (sp2) sp2->ds_skip_bsdlabel = sp1->ds_skip_bsdlabel; } else {