Bhyve and UEFI NVRAM

Subbsd subbsd at gmail.com
Thu Jan 23 11:32:12 UTC 2020


On Thu, Jan 23, 2020 at 10:49 AM Mathieu Arnold <mat at freebsd.org> wrote:
>
> Hi,
>
> Maybe I am going at it in the wrong way, but any hints would be
> appreciated.

You can check https://reviews.freebsd.org/D19976
In addition, you can try to use reFind as work-around: it's not about
nvram actually but in some cases it can help ( )


>
> On Thu, Jan 16, 2020 at 10:04:42AM +0100, Mathieu Arnold wrote:
> > Hi,
> >
> > I have been trying to install arch linux in bhyve, it works great if I
> > uses the BIOS with grub, but for my purpose, I need to be able to boot
> > using UEFI mode.
> > So, I install the vm using the arch iso, it works just fine, I use the
> > tutorial here https://wiki.archlinux.org/index.php/EFISTUB to boot using
> > UEFI directly, without adding a layer of boot manager, which is
> > basically using:
> >
> > efibootmgr --disk /dev/vda --part 1 --create --label "Arch Linux" --loader /vmlinuz-linux --unicode 'root=PARTUUID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX rw initrd=\initramfs-linux.img' --verbose
> >
> > to add a boot entry to the NVRAM with the correct "thingies" to get the
> > UEFI firmware to find all it needs.
> >
> > It works correctly because if at that point I reboot the vm, it boots
> > correctly into the arch installation, and as long as I don't stop/start
> > the vm it works.
> >
> > Now, if I stop the vm and start it up again, it does not work anymore
> > because whatever UEFI NVRAM efibootmgr wrote to, it seems it was only
> > non volatile as long as the bhyve process was running, but it was not
> > actually saved anywhere for later use.
> >
> > So, I am wondering, is there some magic bhyve thing that I could not
> > find in the man page that would allow me to map the nvram to a file on
> > the host?  Or some other magic that would allow me to change the bhyve
> > nvram from the bhyve command line?
> >
> > Regards,
> >
> > PS: as a side note, I don't use bhyve directly but I use it through
> > sysutils/vm-bhyve, but it should probably not matter.
> > --
> > Mathieu Arnold
>
>
>
> --
> Mathieu Arnold


More information about the freebsd-virtualization mailing list