Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing OpenBSD 6.7 with UEFI #372

Open
kelp opened this issue Jun 23, 2020 · 1 comment
Open

Installing OpenBSD 6.7 with UEFI #372

kelp opened this issue Jun 23, 2020 · 1 comment

Comments

@kelp
Copy link

kelp commented Jun 23, 2020

Wanted to share some issues I ran into while attempting to install OpenBSD 6.7 with UEFI. I'll also shared some solutions. I did end up getting it to work.

I wanted to boot with UEFI mostly because the grub options are specifying /bsd as the kernel, and this is a bit inconvenient with the new sysupgrade command in OpenBSD 6.6. sysupgrade works by setting the system to to reboot into /bsd.upgrade. I wanted to avoid having to change the grub/vm config on every upgrade.

This is all on the latest vm-bhyve code from github, not the FreeBSD port.

And the bhyve host is FreeBSD 12.1.

I'm using the following config:

loader="uefi"
cpu=2
memory=4G
network0_type="virtio-net"
network0_switch="public"
disk0_type="virtio-blk"
disk0_name="disk0.img"
disk0_dev="sparse-zvol"
bhyve_options="-w"

And installed with the install67.fs like so:

# vm install -i openbsd0 install67.fs

The issue is the vm seems to reboot, and end up here:

Boot Failed. EFI DVD/CDROM
Boot Failed. EFI Misc Device
.

I ended up trying to run bhyve manually to see what was happening. So I ran this:

#!/bin/sh
bhyve -c 1 -m 4G -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \
        -s 0,hostbridge \
        -s 31,lpc -l com1,stdio \
        -s 3:0,ahci-hd,/zroot/vm/.iso/install67.fs,ro \
        -s 4:0,virtio-blk,/dev/zvol/zroot/vm/openbsd1/disk0.img \
        -s 5:0,virtio-net,tap3,mac=58:9c:fc:01:ff:4e \
        -w -U 27a7faf6-b43a-11ea-8c58-a4bf0142e81c \
        openbsd1

And was able to see a bit more about what was going on.

probing: pc0 com0 com1 mem[640K 3049M 16M 20K 4M 64K 1024M]
disk: hd0 hd1*
>> OpenBSD/amd64 BOOTX64 3.50
boot>
cannot open hd0a:/etc/random.seed: No such file or directory
booting hd0a:/6.7/amd64/bsd.rd: 3826379+1557504+3881976+0+598016 [301104+128+465696+311208]=0xa71778
entry point at 0x1001000
rdmsr to register 0xc80 on vcpu 0

I googled that last line and ran across this issue:

machyve/xhyve#179

That post gave me the workaround. At the OpenBSD boot loader run:

set tty com0

This lets the boot continue, I could install successfully. And after that, it boots just fine. The installer asks if you want to set the console to com0, so I said yes. I think that makes future boots ok.

I'm not sure if this is a bug in bhyve, or OpenBSD, but I thought it might be useful to report here in case it helps anyone else, or if it should be documented on the Wiki.

@tub5ta
Copy link
Contributor

tub5ta commented Oct 22, 2020

You have identified that it is wanting a graphical output as standard. You flicked it over to serial and you can use cu. Setting graphics options and using VNC, you can boot and install without modifications.

I have a pull request waiting for Matt to include a template that will work for a standard OpenBSD UEFI install out of the box:

#388

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants