Discussion:
Couldn't boot NetBSD-9.2-amd64-install.img on bhyve VM
(too old to reply)
Greg Troxel
2022-04-17 11:43:00 UTC
Permalink
I'm trying to install NetBSD 9.2 to FreeBSD bhyve VM (UEFI) using install image
downloaded from https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/images/NetBSD-9.2-amd64-install.img.gz
(I attached screenshot)
wd0d: error writing fsbn 270176 of 270176-270179 (wd0 bn 270176; cn 268 tn 0 sn 32)
wd0d: error writing fsbn 264288 of 264288-264319 (wd0 bn 264288; cn 262 tn 3 sn 3), xfer 38, retry 0
wd0: (aborted command)
I would look at the bhyve logs, and see if you can turn on debugging.
It looks like the within-VM system (domU in xen terms) is accessing the
disk, but the hypervisor is seeing the accesses as malformed or
erroneous.

I would also suggest booting single user and trying dd in the utility
menu, both reading from and writing to the virtual disk.

Also, look at how the disk attaches, in dmesg. Often there are pciide
controllers, and ahcisata, or various other kinds, and it may be that
bhyve provides multiple options and some work and some don't and
disabling the non-working one would be a workaround.

It seems overwhelmingly likely that there is a bug in NetBSD or bhyve,
but really hard to say which. I suspect the bhyve people would be
interested in looking into this and would suggest asking there, but if
you can get a well-documented and more minimal failure case, I bet that
would help greatly.
In addition, the following image boot fine. So it may install image
specific issue.
- FreeBSD-13.0-RELEASE-amd64-memstick.img (from FreeBSD official)
- NetBSD-9.2-amd64.iso (from https://cdn.netbsd.org/pub/NetBSD/NetBSD-9.2/images/)
But after you boot the 9.2 iso, can you read/write to the disk?
Michael van Elst
2022-04-20 06:13:48 UTC
Permalink
# gpt create -p 128 ld0
gpt: /dev/rld0: Media size can't be 0
The media size is read as:

ld->sc_secperunit = virtio_read_device_config_8(vsc,
VIRTIO_BLK_CONFIG_CAPACITY) / (ld->sc_secsize / VIRTIO_BLK_BSIZE);

So the host appears to send a size of zero.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Yuuki Enomoto
2022-04-21 12:37:56 UTC
Permalink
Thank you for your informations.

As an additional information, NetBSD 9.2 installation passed when using GRUB
loader instead of UEFI loader and boot from ISO.

I don't know how to boot .img installer in vm-bhyve GRUB mode.

I'd try to more work to the issue.
--
Yuuki Enomoto <***@e-yuuki.org>
B684 4BF2 9CD4 961F 510A 8121 7B4D FF44 2348 20B8
Loading...