Page MenuHomeFreeBSD

nanobsd: Restore boot0cfg functionality
ClosedPublic

Authored by jlduran on May 28 2026, 6:40 PM.
Tags
None
Referenced Files
F166346426: D57311.id178869.diff
Thu, Aug 13, 1:13 AM
Unknown Object (File)
Tue, Aug 11, 10:33 PM
Unknown Object (File)
Tue, Aug 11, 5:38 PM
Unknown Object (File)
Tue, Aug 11, 9:19 AM
Unknown Object (File)
Mon, Aug 10, 9:38 PM
Unknown Object (File)
Mon, Aug 10, 11:37 AM
Unknown Object (File)
Sun, Aug 9, 7:23 PM
Unknown Object (File)
Sun, Aug 9, 3:50 AM
Subscribers

Details

Summary

The need for this step is fading, now is mostly used to allow the
selection of just the two code partitions in the boot0 boot manager,
instead of the default of allowing all four MBR slices (the other two
being cfg and data, which cannot boot).

Test Plan

Add back NANO_BOOT0CFG functionality.
Before:

Booting from Hard Disk..
1  FreeBSD
2  FreeBSD
3  FreeBSD <-- HERE: this is not a bootable slice, this is /cfg, the default mask 0x3 should prevent it from appearing in the menu
F6  PXE
Boot:  1 .

After:

Booting from Hard Disk..
1  FreeBSD
2  FreeBSD
F6  PXE
Boot:  1 .

Also, should address https://lists.freebsd.org/pipermail/freebsd-embedded/2014-January/002222.html

Diff Detail

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

Event Timeline

boot0cfg ${NANO_BOOT0CFG} ${NANO_WORLDDIR}/${NANO_BOOTLOADER} doesn't look right. The only bare arg to boot0cfg is the disk, right?
The other one looks good though.

In D57311#1313282, @imp wrote:

boot0cfg ${NANO_BOOT0CFG} ${NANO_WORLDDIR}/${NANO_BOOTLOADER} doesn't look right. The only bare arg to boot0cfg is the disk, right?

Yes! that is why I created D57310, I'm not sure if it's nonsense.

Doh! Of course. Thanks!

This revision is now accepted and ready to land.May 28 2026, 9:23 PM

The files /boot/boot0 and /boot/boot0sio have 0444 permissions. chmod before when building unprivileged.

This revision now requires review to proceed.May 29 2026, 1:16 AM
This revision is now accepted and ready to land.May 29 2026, 1:50 AM
This revision was automatically updated to reflect the committed changes.