Reproduction:

Run either of the following on OpenBSD 6.2:

 * installboot -r /tmp /dev/null

 * installboot -r /mnt /dev/sd2c

   (nothing needs to be mounted on /mnt)

These make installboot fail with the error message
"installboot: realpath: No such file or directory".


Problem:

In the context of the ambiguity listed below which comes both from
within and without installboot(8), having installboot(8) *say what it
thinks is wrong* e.g. a particular file not existing, would be greatly
useful.


Problem sources:

installboot(8) sources of ambiguity:

 * It seems to me that the underlying technology stack within the OS
   has some ambiguities in it (per the following definition), e.g. just
   10 minutes ago, doing

   "installboot -v -r /tmp /dev/rsd2c /usr/mdec/biosboot /usr/mdec/boot"
   with /dev/sd2a mounted on /mnt, FAILED (!!), with the same
   "installboot: realpath: No such file or directory" failure message.

   Yet after re-fdisk, re-disklabel, re-newfs sd2a, it *worked*. Yet
   just before that I had done exactly the same thing, which lead up
   to the failure, and this was in a virtual machine which is generally
   safe from uncaught storage errors, so the issue should not have been
   due to reasons external to the OS.

   I have had tons of such experiences when doing disk partitioning work,
   that something works at one time and not at another time. Maybe some
   cache doesn't get flushed. Maybe OpenBSD delays reloading
   partitioning tables.

   So ambiguity in the sense not flushed cache, not documented reload
   pattern. After >25 hours of work with these tools i can't still really
   deduce the problem.

 * Multiple failure states lead to this exact same error message

 * Producing boot media overall is a fairly monolithic process,
   sometimes with partially (!) or fully broken extra-OS behavior e.g.
   broken BIOS or lacking BIOS documentation.

 * Absence of documentation, e.g. there is presently not a single
   mentioning of UEFI boot in "man".


The realpath() failure message is generated in
https://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.sbin/installboot/util.c?rev=1.11&content-type=text/x-cvsweb-markup
 .

Thanks,
Tinker

Reply via email to