Date: Thu, 16 Jan 2020 10:04:42 +0100 From: Mathieu Arnold <mat@FreeBSD.org> To: virtualization@freebsd.org Subject: Bhyve and UEFI NVRAM Message-ID: <20200116090442.xgmiwlaiwwyajqgk@atuin.in.mat.cc>
next in thread | raw e-mail | index | archive | help
--v47xnaxtgqurptcj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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=3DPARTUUID=3DXXXXXXXX-XXXX-XXXX-XXXX-XXXXXXX= XXXXX rw initrd=3D\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. --=20 Mathieu Arnold --v47xnaxtgqurptcj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEOraXidLtEhBkQLpbOkUW81GDzkgFAl4gJylfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNB QjY5Nzg5RDJFRDEyMTA2NDQwQkE1QjNBNDUxNkYzNTE4M0NFNDgACgkQOkUW81GD zkg0JA/+IOAraobp/AHPPLg7+ehJwbzUGmnoB0fOx3n+NJVrfsrk2NvfgV+CqBui nV/MlKtwwAHIOpV0Gb5vxDdxprzPkTXBZZvs58aYTd4PEvP445QDYNfeNWGjSiz+ IYvVEimrHrIrFJJjbOV3aj9XrBQXafiWmhkeYjMH64YaxbnFCp6eNmTno9bi/AaH jxb1ohM82/BN+stvErgPPMA0WHF+crf+ojot3uAl9n6KXIs8XFPORVUftEdwIlnh bWrenVe3WB+vNp1H/zcpZJfws71S+xq+8Kb7QqY7ne18iU1RHjbwle3Khk2U8LGl PmhJJ5Iy1e07BFfNC+/mh5modKf0yfWzhbkGmAJrg/cNwnbGIF4QpmC9aK5/1gZQ TuuNw/3nz1+1q9Ewvb0FeVN26Yl+ukqg9GcM+72vw/ZrD+ewVuhB79pNNblUR0h0 yyOmerwGIb+A//dzmk7KFsq4mkvUawZOOJTBplRd1NV6zhr71GfE0Y/B2q/Zp30a Qgr3CfsIHR0bOTWFogowRwTA+rMrPcpC4JHlw8/bjOxN9i231SuiO42lVPylXrtd zWGI5psQcvauHLmEbNDLhoxXuNvzsPZFoOPN89/rnSFgcGdG985EcVn9PwQfTIWj /QRI0qbpUgCocJMrJF1Lzjop9L+5JDuWqLUm+rw88YjmwpV7/QY= =DCP/ -----END PGP SIGNATURE----- --v47xnaxtgqurptcj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20200116090442.xgmiwlaiwwyajqgk>