The fact that netbooting cannot be interrupted has caused me to waste a lot
of time over the years.

Whether the config is screwed, there is a typo in a config or a cable has
fallen off somewhere,
it would be very nice to be able to kill the netboot and start again,
regardless of this particular reason.



On Sun, 29 Dec 2019 at 22:45, Klemens Nanni <k...@openbsd.org> wrote:

> OBP defaults to booting from disk and network in that order.
> With multiple disks attached, only the first disk is tried.
>
> OBP mostly if not always also defaults to automatic boot, meaning
> domains start trying boot devices once the firmware is done rather than
> dropping into the {0} ok prompt.
>
> This means (newly provisioned) guest domains may end up in network boot
> loops without any possibility to force booting off any particular disk.
>
> I ran into this case with a bunch of domains like this one:
>
>         domain "guest01" {
>                 vdisk "/var/ldom/guest01.img"
>                 vdisk "/var/ldom/miniroot66.fs"
>                 vnet
>                 ...
>         }
>
> Empty disk, miniroot for bootstrap/recovery and network.  But since the
> first disk (empty/invalid) cannot be booted from, OBP tries booting off
> net and seemingly does so forever: multiple solutions exist:
>
> - remove network so OBP exhausts boot devices and drops to prompt
>    (not tested)
> - provide working network boot setup
> - make miniroot be the first disk so OBP boots into something usable
> - provision the actual guest disk prior to starting the domain
> - make OBP stay at boot prompt with `variable auto-boot?=false'
>
> Since our code handles no dynamic runtime changes, all of those
> approaches currently requires rewriting new LDOM configurations and
> resetting the physical machine to make it effective.
>
> Implementing the features will take much effort, but polishing
> documentation to make users more aware of such behaviour is easy, so I
> want to start with simply mentioning which disk is tried at boot.
>
> Hopefull users transport this into ordering their `vdisk' lines
> accordingly or disabling automatic boot.
>
> Feedback? OK?
>
>
> Index: ldom.conf.5
> ===================================================================
> RCS file: /cvs/src/usr.sbin/ldomctl/ldom.conf.5,v
> retrieving revision 1.9
> diff -u -p -r1.9 ldom.conf.5
> --- ldom.conf.5 3 Dec 2019 21:07:03 -0000       1.9
> +++ ldom.conf.5 29 Dec 2019 22:11:12 -0000
> @@ -64,6 +64,7 @@ can be a block device node or a disk ima
>  .Cm create-vdisk
>  command.
>  This keyword can be used multiple times.
> +The first disk will be the default boot device.
>  .It Ic vnet Op Brq Ar keyword Ns = Ns Ar value ...
>  Assign a
>  .Xr vnet 4
>
>

Reply via email to