Run Alpine Linux Via vm-bhyve On FreeBSD - 2023-07-11
The Issue
The sample
template for alpine linux in the vm-bhyve project is using grub
to boot the OS.
With this template I got the following error on every boot:
error: unknown filesystem.
error: you need to load the kernel first.
Solution Workaround
After moving from grub
to uefi
everything worked fine.
Additionally, I changed virtio-blk
to nvme
because multiple sources
mentioned an enhancement in disk speed.
The template should look something like this:
loader="uefi"
cpu=1
memory=512M
network0_type="nvme"
network0_switch="public"
disk0_type="nvme"
disk0_name="disk0.img"
The changes in detail:
- replace
loader="grub"
withloader="uefi"
- remove all lines containing the word
grub_
- replace
disk0_type="virtio-blk"
withdisk0_type="nvme"
You will also need to install sysutils/bhyve-firmware
if you haven’t done so
already.