In the gpart(8) man page under examples is the sentence: "A size of 15 blocks (7680 bytes) would be sufficient for booting from UFS but let's use 128 blocks (64 KB) here in this example, in order to reserve some space for potential future need (e.g. from a ZFS partition)." This is incorrect (maybe because the size of /boot/gptboot has changed since the man page was written, or maybe it's an error). The current size of gptboot is 13851 bytes: #ls -l gptboot -r--r--r-- 1 root 0 13851 Feb 17 02:19 gptboot 13851/512 = 27.05 blocks Rounding up, the minimum size for the freebsd-boot partition is 28 blocks. Fix: So, the sentence in the man page should read: "A size of 28 blocks (14336 bytes) would be sufficient for booting from UFS but let's use 128 blocks (64 KB) here in this example, in order to reserve some space for potential future need (e.g. from a ZFS partition)." Patch attached with submission follows:
Responsible Changed From-To: freebsd-doc->eadler I'll take it.
Responsible Changed From-To: eadler->freebsd-doc I won't be looking at this PR for a while and I need to clear some out of my queue
Hello, I found another bug in the gpart(8) man page and I am reporting it here instead of filing a new bug, because it only requires a small correction. Please tell me if you need a separate bug report instead. Among the examples: > After creating all required partitions, embed bootstrap code into them: > > /sbin/gpart bootcode -p /boot/boot1 da0 That command is not valid. Maybe the '-p' should be a '-b'? # /sbin/gpart bootcode -p /boot/boot1 da0 gpart: missing -i option
> > After creating all required partitions, embed bootstrap code into them: > > > > /sbin/gpart bootcode -p /boot/boot1 da0 > > That command is not valid. Maybe the '-p' should be a '-b'? > > # /sbin/gpart bootcode -p /boot/boot1 da0 > gpart: missing -i option This command is correct and applicably only for VTOC8 scheme.
(In reply to Andrey V. Elsukov from comment #4) You are right, I am sorry for the noise.
(In reply to rsimmons0 from comment #0) The 15 blocks is referring to /boot/boot2 (which is 7680 bytes). UFS doesn't use the first 15 blocks of the partition, and that is where we stuff boot2, which is loaded from boot1, which lives in the volume boot record, which itself is loaded by boot0 which lives in the master boot record. All of this only applies to MBR. This advice has already been changed in the man page in 2012: https://svnweb.freebsd.org/base/head/lib/geom/part/gpart.8?r1=230058&r2=230059&