On 2020-07-24 14:36, Markus Kolb wrote:
> Am 24.07.2020 17:30, schrieb Theo de Raadt:
> [...]
>> non-OpenBSD bootloaders will do a shitty job of booting OpenBSD.
>> I'm not going to bother explaining the situation in detail.  People
>> who try to go that way have already decided they don't care about the
>> consequences.
> 
> Ok. Thanks.
> 
> Are you talking about biosboot or 2nd stage boot?
> 
> But would it be in theory possible to program a
> (1) specialized "bootloader" which is bootable by linux-cmd of grub
> and
> (2) this specialized "bootloader" continues with the BSD boot code? At the 
> moment I'm thinking of 2nd stage boot.
> So going from grub 2nd stage via fake-linux-kernel to 2nd stage OpenBSD 
> boot...
> 
> Part 1 should be doable.
> But what is about part 2? Would it be possible or are there technical system 
> restrictions making it impossible e.g. like CPU operating modes or 
> restrictions to access the BIOS?
> And so any further thinking and investigation in this way is waste of time...

I highly doubt OpenBSD will work in PVH mode without both kernel
and bootloader changes.  This isn’t specific to OpenBSD, btw.
Windows has the same restriction.  The primary reason is that PVH mode
doesn’t expose any emulated hard drives.  Unless boot(8) has support
for Xen PV block devices, this will prevent it from loading the kernel.

Is there some reason you cannot use HVM?  OpenBSD on Xen works well
in HVM mode.  OpenBSD lacks PV console support, so you will need to
rely on emulated serial and/or VGA, but you do get PV netfront and
blockfront drivers.  That said, don’t expect tight integration with
the host system.  There are no userspace APIs for Xen hypercalls, for
instance, so vchans won’t work.  On the other hand, if you don’t
need any advanced Xen-specific features, OpenBSD will work fine.
PCI passthrough works too.  XenStore can be accessed via hostctl(8).

Are you trying to make OpenBSD work on QubesOS?  If so, I have
an OpenBSD TemplateVM that works somewhat well, although qrexec
and qubesd don’t work due to the aforementioned lack of vchans.
If not, would you mind going into detail about your host configuration?
I suspect that the closer the virtual environment is to bare hardware,
the better OpenBSD will behave.  The host will also need to provide
a DHCP server if you want network autoconfiguration to work.

Sincerely,

Demi


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to