Fix long-standing bug in boot1 code - can read junk from fake partition table
boot1 reads the MBR to locate the BSD partition type (0xA5). However, to
reduce the size of the boot1 code the 32 bit LBA for the MBR was being
loaded via the fake partition table at label 'part4', which was assumed to
contain a LBA of 0. Unfortunately this portion of the boot1 code is not
usually written by the disklabel program and may contain garbage.
For the last few years we have worked around the issue by zeroing out
the label area before installing a new label. We still have to do this
to avoid disklabel32/disklabel64 confusion, but with this fix forgetting
to zero the area should not cause a properly installed disklabel to fail
to boot properly.
To fix the problem, add the necessary instructions to generate a 32 bit
LBA of 0 directly for reading the MBR. They barely fit.