git: 03c71ed44a04 - stable/14 - mkimg: Add ms-basic-data alias for GPT
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 27 Jul 2026 03:45:21 UTC
The branch stable/14 has been updated by jlduran:
URL: https://cgit.FreeBSD.org/src/commit/?id=03c71ed44a0480091be9408faf3386879a9ee759
commit 03c71ed44a0480091be9408faf3386879a9ee759
Author: Jose Luis Duran <jlduran@FreeBSD.org>
AuthorDate: 2026-07-13 12:25:30 +0000
Commit: Jose Luis Duran <jlduran@FreeBSD.org>
CommitDate: 2026-07-27 03:42:48 +0000
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
(cherry picked from commit 67f1c082b5ec37e2060b74e6f1f952ed38761468)
---
usr.bin/mkimg/gpt.c | 1 +
usr.bin/mkimg/scheme.c | 1 +
usr.bin/mkimg/scheme.h | 1 +
3 files changed, 3 insertions(+)
diff --git a/usr.bin/mkimg/gpt.c b/usr.bin/mkimg/gpt.c
index ed3f008c394f..5fae98e0d4ef 100644
--- a/usr.bin/mkimg/gpt.c
+++ b/usr.bin/mkimg/gpt.c
@@ -61,6 +61,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_NONE, 0 } /* Keep last! */
diff --git a/usr.bin/mkimg/scheme.c b/usr.bin/mkimg/scheme.c
index 85ed94013e8d..0af86f6d9111 100644
--- a/usr.bin/mkimg/scheme.c
+++ b/usr.bin/mkimg/scheme.c
@@ -54,6 +54,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 },
{ NULL, ALIAS_NONE } /* Keep last! */
diff --git a/usr.bin/mkimg/scheme.h b/usr.bin/mkimg/scheme.h
index 52614255595f..693f04983624 100644
--- a/usr.bin/mkimg/scheme.h
+++ b/usr.bin/mkimg/scheme.h
@@ -43,6 +43,7 @@ enum alias {
ALIAS_FREEBSD_VINUM,
ALIAS_FREEBSD_ZFS,
ALIAS_MBR,
+ ALIAS_MS_BASIC_DATA,
ALIAS_NTFS,
ALIAS_PPCBOOT,
/* end */