mkimg: Add ms-basic-data alias for GPT

While preparing GPT-schemed RaspberryPi images for the NanoBSD
Reimagined GSoC 2026 project, a discrepancy was identified between
mkimg(1) and gpart(8) regarding Microsoft Basic Data partitions (GUID
!ebd0a0a2-b9e5-4433-87c0-68b6b72699c7).

Currently, mkimg(1) relies on the MBR-centric name "ntfs" to identify
this partition type under the GPT scheme.  Conversely, gpart(8)
identifies this type as "ms-basic-data".

To allow automation scripts (such as those consuming from gpart backup)
to use a common partition type across tools, add ALIAS_MS_BASIC_DATA as
a valid alias.

This is part of a larger effort to avoid a custom, MBR-based image
generation logic for embedded SoCs like the Raspberry Pi, standardizing
on GPT layouts across all supported FreeBSD embedded devices.

Reviewed by:	imp
MFC after:      2 weeks
Differential Revision:	https://reviews.freebsd.org/D58198
This commit is contained in:
Jose Luis Duran committed 2026-07-13 12:25:30 +00:00
1 parent 141b664520
commit 67f1c082b5
3 files changed
+3

No files matched your search

+1
View File
@@ -66,6 +66,7 @@ static struct mkimg_alias gpt_aliases[] = {
{ ALIAS_FREEBSD_VINUM, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_vinum) },
{ ALIAS_FREEBSD_ZFS, ALIAS_PTR2TYPE(&gpt_uuid_freebsd_zfs) },
{ ALIAS_MBR, ALIAS_PTR2TYPE(&gpt_uuid_mbr) },
{ ALIAS_MS_BASIC_DATA, ALIAS_PTR2TYPE(&gpt_uuid_ms_basic_data) },
{ ALIAS_NTFS, ALIAS_PTR2TYPE(&gpt_uuid_ms_basic_data) },
{ ALIAS_PPCBOOT, ALIAS_PTR2TYPE(&gpt_uuid_prep_boot) },
{ ALIAS_HIFIVE_BBL, ALIAS_PTR2TYPE(&gpt_uuid_hifive_bbl) },
+1
View File
@@ -56,6 +56,7 @@ static struct {
{ "freebsd-vinum", ALIAS_FREEBSD_VINUM },
{ "freebsd-zfs", ALIAS_FREEBSD_ZFS },
{ "mbr", ALIAS_MBR },
{ "ms-basic-data", ALIAS_MS_BASIC_DATA },
{ "ntfs", ALIAS_NTFS },
{ "prepboot", ALIAS_PPCBOOT },
{ "hifive-bbl", ALIAS_HIFIVE_BBL },
+1
View File
@@ -45,6 +45,7 @@ enum alias {
ALIAS_FREEBSD_VINUM,
ALIAS_FREEBSD_ZFS,
ALIAS_MBR,
ALIAS_MS_BASIC_DATA,
ALIAS_NTFS,
ALIAS_PPCBOOT,
ALIAS_HIFIVE_BBL,