From nobody Sat Jan 17 18:13:05 2026 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 4dtlFY6PNRz6P3vC for ; Sat, 17 Jan 2026 18:13:05 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4dtlFY4GR8z3p3R for ; Sat, 17 Jan 2026 18:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768673585; 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=tbXssQjVv+tQ8VI06ecwFchY56C9uproaR8fbTJgIOI=; b=KTXykJ3XuJYnHEYEe97+atby9Sju3/XIxURMFDfgQNGroHoGpMzBHPe5cveEt1rAliz2sB 7ho6ueOa9Jzz8uN/96yZczqYgjrGKeqVcqhPz0G6BsK6GN57rh6pPY5aSOYL24fM/INRKM 3+VkkMbeTzuP3dkjDuIWoXTURq6iPn/RMfSSNBtN4CBhYSLbbBdgq+PFVvEsX3LNnjBSMD +mZIZDsFXZBu0mPWfXIx1sJD40tdWx0HYC6xLqoGXyTnv/p7DpnVRt70ZPmfYPm5gtlxgp oxq75DYCoWN/p3FTTda7aCCu/m5ohdABviIYDyw12janZPFZ41gqP7hkZ+4T6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1768673585; 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=tbXssQjVv+tQ8VI06ecwFchY56C9uproaR8fbTJgIOI=; b=rt5AoavRnJkgWOQxoJXzVa/cXaiVbNgJA9aBbyRJWQYsKOl9HQojKAMmpsi6uDDjF++rbU awrdZ3fjQnzkq/66W49LPkLR365cdUGmRFqxlTlBIyPWxAOCBBXBjQbNy6AgxHjX0hl5pf siYz9UIgq2ZZteqgoudp/O3n3P8eFQ38E6eBsBHmUK4c4x+wkxFISxmEYi+QQBfzJj5+6H liPFGdL+oHLCfBNB8Nr9blXk/zxtSWZ6yC7mhVKeJATu6m4cEo3mDB68VmOamQ/oJYKn60 fza8FFStgLC62juKj3cQyY8Q6RC22uC7ypsGR8zMIFNliFT3QNodkheJX2cytQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1768673585; a=rsa-sha256; cv=none; b=OLYbe/I5Fd8GOycViihInJLoSNBkccrYeGgA9usHx9ZK3NTNAPTp73Fob4gwJ7l1frTAQq VMkDAirV0a/PTcNUvBO/udYm8w7o1fZExm3rQKdzt6aY2OmN9fVr2Tgt8igDhlLHymF9i+ nJd9NwwAcGCPGbWwhHZTOMwOF3pUkk4P3DFCfL6jEsVxeyqd+WytyiHdQh90NZ3dWxiSDm GjJaqExNbe0tlwIr3cGbtXF0Tx/Jti3SozS1YYmmQRdqddMqBPKRASlcMyyLmSGdl4UKDU udb0pY1/gIQxoLzgfb4vcadOSEOaImbmrUAQ0UUPB2lnDXZS+A3hsLNoYTe88A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4dtlFY3XyVz19Sq for ; Sat, 17 Jan 2026 18:13:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39dba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 17 Jan 2026 18:13:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jose Luis Duran Subject: git: 4f141f5ef4a5 - main - nanobsd: Switch the / partition in fstab 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: 4f141f5ef4a531eccacf226b5a0d4507f36cfa44 Auto-Submitted: auto-generated Date: Sat, 17 Jan 2026 18:13:05 +0000 Message-Id: <696bd131.39dba.7fecf9cd@gitrepo.freebsd.org> The branch main has been updated by jlduran: URL: https://cgit.FreeBSD.org/src/commit/?id=4f141f5ef4a531eccacf226b5a0d4507f36cfa44 commit 4f141f5ef4a531eccacf226b5a0d4507f36cfa44 Author: Jose Luis Duran AuthorDate: 2026-01-17 18:08:03 +0000 Commit: Jose Luis Duran CommitDate: 2026-01-17 18:08:03 +0000 nanobsd: Switch the / partition in fstab Introduce a function tgt_switch_root_fstab() that switches the root partition in the target file system tab file. Initially not wired. Reviewed by: imp MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D48788 --- tools/tools/nanobsd/defaults.sh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tools/tools/nanobsd/defaults.sh b/tools/tools/nanobsd/defaults.sh index fd98482f7115..13e7797df2f5 100755 --- a/tools/tools/nanobsd/defaults.sh +++ b/tools/tools/nanobsd/defaults.sh @@ -308,6 +308,22 @@ tgt_dir() { done } +# +# Switch the current root partition in the target file system tab. +# Takes two arguments: the current, and the new partition. +# +tgt_switch_root_fstab() +{ + local current new + current="$1" + new="$2" + + for f in ${NANO_WORLDDIR}/etc/fstab ${NANO_WORLDDIR}/conf/base/etc/fstab + do + sed -i "" "s=${NANO_DRIVE}${current}=${NANO_DRIVE}${new}=g" "${f}" + done +} + # run in the world chroot, errors fatal CR() { chroot "${NANO_WORLDDIR}" /bin/sh -exc "$*"