Page MenuHomeFreeBSD

nanobsd: Add gpt support
Needs ReviewPublic

Authored by senguptaangshuman17_gmail.com on Wed, Aug 19, 10:21 AM.

Details

Reviewers
jlduran
jrm
ashish
imp
Group Reviewers
scheduler
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 75884
Build 72767: arc lint + arc unit

Event Timeline

tools/tools/nanobsd/FlashDevice.sub
39 ↗(On Diff #184329)

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

tools/tools/nanobsd/defaults.sh
1641

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
1

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
1

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?