Page MenuHomeFreeBSD

nanobsd: Account for metadata overhead in code slice
ClosedPublic

Authored by jlduran on May 24 2026, 11:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Jun 15, 1:46 AM
Unknown Object (File)
Sun, Jun 7, 11:29 AM
Unknown Object (File)
Sun, Jun 7, 11:23 AM
Unknown Object (File)
Sat, Jun 6, 6:29 PM
Unknown Object (File)
Sat, Jun 6, 6:24 PM
Unknown Object (File)
Thu, Jun 4, 6:35 PM
Unknown Object (File)
Thu, Jun 4, 6:29 PM
Unknown Object (File)
Thu, Jun 4, 5:33 AM
Subscribers

Details

Summary

The code slice size (CODE_SIZE) includes 16 sectors reserved for disk
metadata (see bsdlabel(8) offset). Subtract these 16 sectors from the
total size passed to nano_makefs.

This prevents the generated filesystem from consuming the entire slice
allocation, ensuring there is enough space for the metadata without
overflowing the partition boundary.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable