From nobody Wed Nov 20 22:34:13 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 4Xtx456D4Vz5dqg6; Wed, 20 Nov 2024 22:34:13 +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 4Xtx455cjDz4488; Wed, 20 Nov 2024 22:34:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142053; 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=cEkasTTRII3/prKC9sRSRZQhbiI2cD4nUZzMiaQQKwM=; b=RIbVFrLd8unzHRG0fjUP8zueVs/2x3BDpKAWI9ridbHk+oN/KZo48C6pOE5OE/5ILGDSCq 7Y3lukC80i99s58ugSjQBFVyJywvLrejP26+U9Z2ULssfH3mrvGkgUCNTx5sADWxSi1EII D31+EOQbWShbgb0U9GVQvB8m+W6VYhZz881wzrUY0R5djUWgHXs9pWnEuklZ/w2LUkzLyJ 6LmgDIScITuYl/YAWBFGeWrkqpipaqSk4VSQiJd1f6/KGuTOwg5qkhNEVFvsmbmLe2MdGk uEuQXyrSlNafI9YzUlNkLG/2Q1TPHXqLcZO2IoQ3MuNpRG/UyDvpitd0cJSkpQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1732142053; 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=cEkasTTRII3/prKC9sRSRZQhbiI2cD4nUZzMiaQQKwM=; b=bYRJwmJfZOCzmqV/tx/o736HGOo4E6HAAr9DqsMr4eF+waQ6frOhd1QreCWkMAPXJyxhMH yuqDttFmylYRT1xVWDhYgRo4s9+ZAth8EXSIuDVpADLwf6lS0R8WVlC1VLZq3ueYeDWyGs /bUVr8jiGIHKzDIpSv3d3mDE01Y44KB2vLYpIcVzV3lq4XEqYzlJOvsBsiIQbVW7ehv+mc Q9hfn7dKwD/gfG0fq75PsXcbXFuDYK2/rhUJq1009vuoMTHqGS8jegC49cUK3Dz4ZKun/g y0IO6fhgb+JYwuuiU9T58wAFO/pCeaeDMR0MMHJnkF37wnsF1Q2YAkrRdfyhHA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1732142053; a=rsa-sha256; cv=none; b=V6LZAi1PuInMi9nJLeMUYM94zCpA84QxXB1FLRUCNATu9jyZU0N2kj6nI99wT6O3VSVeHV atk1h+pPT70IchEmaSv3AGDnmYIBFyF6KAffOdZB4ClviEp+38HouKz+ViCSPllc7dCQmG 6U9eMp1zuMIS04s8ZrEKmDINlzXusyMfxqRkDvplc4HHpOtCYSuZLZ8P9YUNpdRtkHkG4A dK4gsJvLB1REOMHhhwM+UqjJLRdpLtBEtot6/yVEC3Jy0+07ve7uLK2H8aKqcyvbxxI7W3 NbAwPTw0AiC48EGa4D9IQgaZSdsu1N/5p0Wh3kFCFoa7gcAm1CU3/eBD9MBy+w== 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 4Xtx455CVHz1C9R; Wed, 20 Nov 2024 22:34:13 +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 4AKMYD4Z021453; Wed, 20 Nov 2024 22:34:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AKMYDPC021450; Wed, 20 Nov 2024 22:34:13 GMT (envelope-from git) Date: Wed, 20 Nov 2024 22:34:13 GMT Message-Id: <202411202234.4AKMYDPC021450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 87e87fecb139 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 87e87fecb139d60a00837f004de0d37dbecd205c Auto-Submitted: auto-generated The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=87e87fecb139d60a00837f004de0d37dbecd205c commit 87e87fecb139d60a00837f004de0d37dbecd205c Author: Jose Luis Duran AuthorDate: 2024-11-18 00:16:50 +0000 Commit: Jose Luis Duran CommitDate: 2024-11-20 22:31:56 +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 --- 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}"