From owner-freebsd-geom@freebsd.org Mon Jul 9 21:22:06 2018 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7CCBB10318AA for ; Mon, 9 Jul 2018 21:22:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 13EA7887BF for ; Mon, 9 Jul 2018 21:22:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id C398510318A9; Mon, 9 Jul 2018 21:22:05 +0000 (UTC) Delivered-To: geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B1DEC10318A8 for ; Mon, 9 Jul 2018 21:22:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 50B18887BB for ; Mon, 9 Jul 2018 21:22:05 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id 762F8268F3 for ; Mon, 9 Jul 2018 21:22:04 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w69LM4FY017353 for ; Mon, 9 Jul 2018 21:22:04 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w69LM4Dn017352 for geom@FreeBSD.org; Mon, 9 Jul 2018 21:22:04 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: geom@FreeBSD.org Subject: [Bug 229594] Incorrect "No such geom" error when executing gpart with invalid or incorrect gpt partition number Date: Mon, 09 Jul 2018 21:22:04 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: bin X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Many People X-Bugzilla-Who: mqudsi@neosmart.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: geom@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2018 21:22:06 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229594 --- Comment #5 from Mahmoud Al-Qudsi --- I just realized that while gpart may not work on DISK objects, it *does* kn= ow about their existence, at the very least. `gpart create -s mbr aoneuh` retu= rns an error while `gpart create -s mbr nvd0` (where `nvd0` is a valid DISK obj= ect and not (yet) the name of a valid PART object) will succeed. That means that when `gpart bootcode -b ... -p ... -i $N $DISK` is executed, gpart _could_ distinguish between $DISK not existing at all (which the curr= ent error message could be taken to assert universally) vs $DISK being a valid = disk but not a valid PART object. My proposal is for the permutation of $N and $DISK to determine which of the following messages is displayed: * $DISK is not a valid disk * $DISK is not partitioned for use with gpart * $N is not a valid partition on $DISK (if $N is too big) (text is obviously just a first stab at clarifying the situation and can use refinement) --=20 You are receiving this mail because: You are the assignee for the bug.=