Page MenuHomeFreeBSD

nanobsd: Add gpt support
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Wed, Aug 19, 10:21 AM.
Tags
None
Referenced Files
F167403253: D58964.id184464.diff
Fri, Aug 21, 2:01 PM
F167402822: D58964.id184601.diff
Fri, Aug 21, 1:57 PM
F167402142: D58964.id184515.diff
Fri, Aug 21, 1:52 PM
F167402048: D58964.id184329.diff
Fri, Aug 21, 1:51 PM
F167402043: D58964.id184540.diff
Fri, Aug 21, 1:51 PM
F167402019: D58964.id184545.diff
Fri, Aug 21, 1:51 PM
F167401747: D58964.id184561.diff
Fri, Aug 21, 1:49 PM
F167401321: D58964.id184550.diff
Fri, Aug 21, 1:44 PM
Subscribers

Details

Summary

Introduce gpt.sh, a GPT partitioned plan with dual BIOS and UEFI
boot support, dynamic partition sizing and labeled root, altroot,
cfg and data partitions. Move legacy only pieces from defaults.sh
into legacy.sh.

Move change_password, save_cfg and save_sshkeys from root/bin to
usr/local/sbin, which is on the default PATH.

Set NANO_DRIVE from NANO_LABEL instead of hard coding vtbd0, and
clean up tgt_dir2symlink() and make_boot_partition().

Co-authored-by: Jose Luis Duran <jlduran@FreeBSD.org>
Sponsored by: Google LLC (GSoC 2026)

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 75875
Build 72758: arc lint + arc unit

Event Timeline

tools/tools/nanobsd/FlashDevice.sub
39

Please submit all non-functional, style(9)-related changes in a single revision (D58931).

tools/tools/nanobsd/defaults.sh
1631

This function gets replaced by strtobytes() in D58969. Please unify, and introduce in a separate commit, as this is a legacy-breaking change.

Include NANO_ALIGN in initial calculate_partitioning implementation

Clean up recovery ESP and simplify make_esp_partition

tools/tools/nanobsd/gpt.sh
2

I think this file should be renamed to ufs.sh, when adding support for ZFS, this becomes evident. I can show you a draft of what I have for ZFS in our next meeting.

tools/tools/nanobsd/gpt.sh
2

I think this file should be renamed to ufs.sh, when adding support for ZFS, this becomes evident. I can show you a draft of what I have for ZFS in our next meeting.

Ok sure, so should I update the name of this file to ufs.sh?

Address review comments: normalize all 5 XXXJL comments to # XXX: