[Bug 229594] Incorrect "No such geom" error when executing gpart with invalid or incorrect gpt partition number
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jul 9 21:22:06 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229594
--- Comment #5 from Mahmoud Al-Qudsi <mqudsi at neosmart.net> ---
I just realized that while gpart may not work on DISK objects, it *does* know
about their existence, at the very least. `gpart create -s mbr aoneuh` returns
an error while `gpart create -s mbr nvd0` (where `nvd0` is a valid DISK object
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 current
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)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-geom
mailing list