From nobody Sat Dec 21 17:06:29 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YFrKf0bM4z5hPdd; Sat, 21 Dec 2024 17:06:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YFrKd6gGSz4PvF; Sat, 21 Dec 2024 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734800789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynKPSKt07Y319QCOyGuzx2aIvOFffgmccjgf5yA4X3M=; b=gUqWzuMEjgdaKGsvW4dtaeTGytpO0B3UQ4LKYCZYXT+TZXArm1ZRsNb1VIHxNWTuSeecI7 4H23NN0yQYCpKL3ziC7SEfDH0rcI3PHhxdWsB63h1tT2oiGet2JdFh/qBfwLnb8xcG3DAh 3VvpAepnht9dRseLQW50Cc+8x1lZtMQYgh2nHvmnIBvUXrcFsl6+m2HUKh6PaeGdJlY3q4 ODCC1fp3INSCR7ts/DSQihLX3xXEsd5Y/iQktgBZVXAcaFw7D5RaBewPqNdNTF9OzXAvSO NxhQ6PxrTC2PWkFRFMQl2XNCP1M9Yba2VNHfYVp5C+13BE4uM+7rKI98kOrBfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1734800789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ynKPSKt07Y319QCOyGuzx2aIvOFffgmccjgf5yA4X3M=; b=U00suyeMaytgGIg/9QvMIWXAPi9zHs9XUjT5Ak4Z8hTd5GuMYYXpSdE6y2GFoT0WQxaZCB N0p0+oc6JXJ/GRVqSndYdw9vqt9W97sj46etwblLCFNBnr2TdX/+Nc0l+mb3pSr/TtIjHL APD6TCybfI7Nrl0xxV6zXlVEAoQVtKdwYiGPprSmTw125SLbQK4pZS3YZ8snAZmltfeZwd Y36Y6wwTtLM0YvrLwCzjNHkwOkZnZqBcvhSf5nw8geW7LPviiZShTVWE/an+IFZJfTlOJT oP+uBgmSZUomR/vggIWg3+XO+4m6Tgt7qhw3+4mH7amY8ZCkWqq+fLpeFbkDuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1734800789; a=rsa-sha256; cv=none; b=d5YqfZDfLEVJBWnhsogISA5dHfXESQuvlBSdC1uQIzJjN5cM0zAsIfGtFc6YgnV9YvXS06 IaX9muOZntRgvM10MaQFWHP+cEWCvHi60e6T/q+wHxFftVqOdi2lgIylL94BZbSBLBfpKT fOl3ptbxUc9stMVmnoON3kg7SeCMZfdY3KvaTKisP3ITHrcZ9kMky7RTK0J1DUz1XHPbra R+6ybOLTANGw3L+MuOCf7kImvq7YPzB5+mb1vhXzi4XEKnk0FbcoRTklClB/Ha+e6LgHqW usXLe/Z/mrxDgTsgT4vtLjYk29TwMeESeex7kmZFBTVowmqNzfuijPux+XYDNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YFrKd68NVzYMg; Sat, 21 Dec 2024 17:06:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4BLH6TT5071531; Sat, 21 Dec 2024 17:06:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BLH6THf071528; Sat, 21 Dec 2024 17:06:29 GMT (envelope-from git) Date: Sat, 21 Dec 2024 17:06:29 GMT Message-Id: <202412211706.4BLH6THf071528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Jose Luis Duran Subject: git: a63708347d83 - stable/13 - nanobsd: Remove dependency on bsdlabel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jlduran X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a63708347d831e37c50cae291ece97d889c71728 Auto-Submitted: auto-generated The branch stable/13 has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=a63708347d831e37c50cae291ece97d889c71728 commit a63708347d831e37c50cae291ece97d889c71728 Author: Jose Luis Duran AuthorDate: 2024-11-18 00:16:50 +0000 Commit: Jose Luis Duran CommitDate: 2024-12-21 17:05:24 +0000 nanobsd: Remove dependency on bsdlabel The bsdlabel utility is deprecated, gpart should be used instead: - Offset the first 16 sectors, just like bsdlabel did (used for metadata) - Use a freebsd-ufs partition type (regardless bsdlabel creating a '!0') Reviewed by: emaste, imp Approved by: emaste (mentor) MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D47653 (cherry picked from commit 87e87fecb139d60a00837f004de0d37dbecd205c) --- tools/tools/nanobsd/legacy.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/tools/nanobsd/legacy.sh b/tools/tools/nanobsd/legacy.sh index 58288d063b4a..a45b447337b2 100644 --- a/tools/tools/nanobsd/legacy.sh +++ b/tools/tools/nanobsd/legacy.sh @@ -116,14 +116,15 @@ create_code_slice ( ) ( trap "echo 'Running exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d -u $MD" 1 2 15 EXIT - bsdlabel -w ${MD} + gpart create -s bsd "${MD}" + gpart add -t freebsd-ufs -b 16 "${MD}" if [ -f ${NANO_WORLDDIR}/boot/boot ]; then echo "Making bootable partition" gpart bootcode -b ${NANO_WORLDDIR}/boot/boot ${MD} else echo "Partition will not be bootable" fi - bsdlabel ${MD} + gpart list ${MD} # Create first image populate_slice /dev/${MD}${NANO_PARTITION_ROOT} ${NANO_WORLDDIR} ${MNT} "${NANO_ROOT}"