Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Jan 2020 14:31:58 +0300
From:      Subbsd <subbsd@gmail.com>
To:        Mathieu Arnold <mat@freebsd.org>
Cc:        virtualization@freebsd.org
Subject:   Re: Bhyve and UEFI NVRAM
Message-ID:  <CAFt_eMpWvtJU4QUh3J%2Bx0v9_pyb4kGQ=yrmeP8DYjQ5kJe6=-w@mail.gmail.com>
In-Reply-To: <20200123074906.bhbpr2cbdmeeqwvz@atuin.in.mat.cc>
References:  <20200116090442.xgmiwlaiwwyajqgk@atuin.in.mat.cc> <20200123074906.bhbpr2cbdmeeqwvz@atuin.in.mat.cc>

next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jan 23, 2020 at 10:49 AM Mathieu Arnold <mat@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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAFt_eMpWvtJU4QUh3J%2Bx0v9_pyb4kGQ=yrmeP8DYjQ5kJe6=-w>