boot block differences between 4.x and 6.x ?
Luigi Rizzo
rizzo at icir.org
Tue Jan 31 10:21:12 PST 2006
On Tue, Jan 31, 2006 at 08:58:04AM -0700, M. Warner Losh wrote:
...
> : The big difference is that the boot blocks grew significantly to
> : support UFS2.
>
> And boot1/boot2 were merged into boot...
ok problem solved, thanks for the pointers.
For the records (and the list archives):
the old-style picobsd script would do
image[0..511] = boot1[0..511]
image[1024..8191] = boot2[512..7679]
counting on a 512-bytes hole which is taken, for
the first 0x114 = 276 (dec) bytes by the label.
The new boot blocks, however have code immediately after
the label so the offset for copying boot2 (or the
equivalent part of /boot/boot) must be set to
276 on the source and 276+512 = 788 on the destination:
image[0..511] = boot1[0..511]
image[788..8191] = boot2[276..7679]
don't know how much of a hack it is to hardwire the
disklabel size into the script, but given that this
approach of explicit constants is used in all the
related pieces of code, i guess there is no better
way around...
cheers
luigi
More information about the freebsd-current
mailing list