From nobody Fri Mar 31 14:37:31 2023 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 4Pp2v01Sybz42qHq; Fri, 31 Mar 2023 14:37:32 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pp2v00yMRz46rs; Fri, 31 Mar 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680273452; 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=p8A7mIBFALfix6Ka5x+pxpYBnA0LYpoXzfaGimT0mjA=; b=ZTbF7R1rYxDagnP8Z54pzlt++aCBA3cLUUb3/vpHirpLFSM/2m6eihYRrF63j2zhJlgGtt vnaf4eEHo5ch3bAw7Sl+u9JhFI80SVoAe5it5dYlYoDBYv9AZTbZ1qERf5Jb6YjHWPOs+n VSu9GRjYiHglVY65Q9TVaJqgTzATxT13w299AMlEsJVOd7coCG07n79a5ueUE/wW0qFYz7 j905iI31+EqLcaRT/OTNyKXf82HrkAoD3i46qQ9SRMzgANZ1T56vSzP42qsMUeHWgLHDnC OFs6JlBcXmRsTaSIL5NITASkEjJAFYKSIrMrsICII6mZYg4GbywG/Yr3kqPI3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1680273452; 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=p8A7mIBFALfix6Ka5x+pxpYBnA0LYpoXzfaGimT0mjA=; b=cQQJ8/RdQ3R7I8zuNLORjpB7YBPCBfp7ai26Ww1kSAKylsN/ax7jHz6cHXoQTGm3e7je6b 7W8/NlAIe3benEyT2xPvgwD/Mk8wSxB1N/bLf3UZav7Ygpx+BC78rgkPrm+tMYu4fTsHx7 HMH5LIOYa8c8GCDqFVRutRWNZwt+egIgXut2wJT41qlXHIUaELg1Bl8BuflUcjU/YzhVrm b2+PBBnNTjR7nrITICTxUSYH6cEmODUfRWVS3BehwU1n0kavsxpYDIus9LQl8cwSt76ztn /NYIGSii4frRc33z6eXxtQkIsBLeYKUxLerEerWeahFbaiSvtDMth0FEznHrnw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1680273452; a=rsa-sha256; cv=none; b=Wgr3tDzIqofd6P5q4G8przTS1cszpEdh9J+mmZtHW5QHpZrVu3cuQg6QbKxIwuxdZa9mOB ocfJlb1Yps7N9OhhINEiHLwfAY5ov3PMKaKXwcpKwuog7COovdS/xpnNP/BMWWM9nxy8WM c7gZXBHHczPS9jGQ16RCc9eCD7w+TeK221kECFYe57EwSmyDhI5HuAL3v157UimbBiLq96 XBplsed6eP+Td/bYhKDRUwuaCdux0KR9pOIjbjr22/X/SVMwF6X6ienClWcvq2jEsQdpxz IcZ1kGHgeBjeWCSXVF9Q2JKzPUOl/Vn/iNtXgterUlP/atiarArYpH2RuHZgEg== 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 4Pp2v001M9zxqS; Fri, 31 Mar 2023 14:37:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 32VEbVxe049515; Fri, 31 Mar 2023 14:37:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 32VEbVrJ049514; Fri, 31 Mar 2023 14:37:31 GMT (envelope-from git) Date: Fri, 31 Mar 2023 14:37:31 GMT Message-Id: <202303311437.32VEbVrJ049514@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: 588f03ec9b9e - main - bectl: Improve error message when ZFS root is not found. 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 588f03ec9b9ebd3c17b3e978140ff3f3e4bcad73 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=588f03ec9b9ebd3c17b3e978140ff3f3e4bcad73 commit 588f03ec9b9ebd3c17b3e978140ff3f3e4bcad73 Author: Andrew Gallatin AuthorDate: 2023-03-30 21:57:26 +0000 Commit: Andrew Gallatin CommitDate: 2023-03-31 14:27:38 +0000 bectl: Improve error message when ZFS root is not found. When recovering a system that is unbootable due to some problem with the active BE, it is likely you'll be booted from a rescue image running UFS. In this case, bectl needs help finding the zpool root that you want to operate on. In this case, improve the error message to suggest specifying a root, rather than just emitting a generic error message that might imply, to the naive user, that there is a ZFS compatibility issue between the rescue image and the on-disk ZFS pool. Reviewed by: imp, kevans Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39346 --- sbin/bectl/bectl.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/sbin/bectl/bectl.c b/sbin/bectl/bectl.c index 2b7af4e55419..814b98ba8a8a 100644 --- a/sbin/bectl/bectl.c +++ b/sbin/bectl/bectl.c @@ -584,9 +584,13 @@ main(int argc, char *argv[]) } if ((be = libbe_init(root)) == NULL) { - if (!cmd->silent) + if (!cmd->silent) { fprintf(stderr, "libbe_init(\"%s\") failed.\n", root != NULL ? root : ""); + if (root == NULL) + fprintf(stderr, + "Try specifying ZFS root using -r.\n"); + } return (-1); }