Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 09 Jul 2018 21:22:04 +0000
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
Message-ID:  <bug-229594-14739-7xyhyL03v5@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-229594-14739@https.bugs.freebsd.org/bugzilla/>
References:  <bug-229594-14739@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D229594

--- Comment #5 from Mahmoud Al-Qudsi <mqudsi@neosmart.net> ---
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.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-229594-14739-7xyhyL03v5>