From owner-freebsd-virtualization@freebsd.org Thu Jan 23 07:49:09 2020 Return-Path: Delivered-To: freebsd-virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1382922F97E for ; Thu, 23 Jan 2020 07:49:09 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mailman.nyi.freebsd.org (mailman.nyi.freebsd.org [IPv6:2610:1c1:1:606c::50:13]) by mx1.freebsd.org (Postfix) with ESMTP id 483DtX6pC3z4Fk7 for ; Thu, 23 Jan 2020 07:49:08 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id E962B22F97D; Thu, 23 Jan 2020 07:49:08 +0000 (UTC) Delivered-To: virtualization@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E92D922F97C for ; Thu, 23 Jan 2020 07:49:08 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483DtX5v7Lz4Fk6 for ; Thu, 23 Jan 2020 07:49:08 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from mail.j.mat.cc (owncloud.cube.mat.cc [IPv6:2a01:678:4:1::228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.mat.cc", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: mat/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id A99D32FF1 for ; Thu, 23 Jan 2020 07:49:08 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from atuin.in.mat.cc (unknown [IPv6:2a01:678:42:ffff:688d:c7d:2372:9b50]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: mat@mat.cc) by mail.j.mat.cc (Postfix) with ESMTPSA id 6C0BF942D80 for ; Thu, 23 Jan 2020 07:49:07 +0000 (UTC) Date: Thu, 23 Jan 2020 08:49:06 +0100 From: Mathieu Arnold To: virtualization@freebsd.org Subject: Re: Bhyve and UEFI NVRAM Message-ID: <20200123074906.bhbpr2cbdmeeqwvz@atuin.in.mat.cc> References: <20200116090442.xgmiwlaiwwyajqgk@atuin.in.mat.cc> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="elafskrj3fxxew2c" Content-Disposition: inline In-Reply-To: <20200116090442.xgmiwlaiwwyajqgk@atuin.in.mat.cc> X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Jan 2020 07:49:09 -0000 --elafskrj3fxxew2c Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, Maybe I am going at it in the wrong way, but any hints would be appreciated. On Thu, Jan 16, 2020 at 10:04:42AM +0100, Mathieu Arnold wrote: > Hi, >=20 > 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: >=20 > efibootmgr --disk /dev/vda --part 1 --create --label "Arch Linux" --loade= r /vmlinuz-linux --unicode 'root=3DPARTUUID=3DXXXXXXXX-XXXX-XXXX-XXXX-XXXXX= XXXXXXX rw initrd=3D\initramfs-linux.img' --verbose >=20 > to add a boot entry to the NVRAM with the correct "thingies" to get the > UEFI firmware to find all it needs. >=20 > 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. >=20 > 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. >=20 > 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? >=20 > Regards, >=20 > 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 --=20 Mathieu Arnold --elafskrj3fxxew2c Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQKTBAABCgB9FiEEOraXidLtEhBkQLpbOkUW81GDzkgFAl4pT/JfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldDNB QjY5Nzg5RDJFRDEyMTA2NDQwQkE1QjNBNDUxNkYzNTE4M0NFNDgACgkQOkUW81GD zkhvJxAAu7tGyrCja30TPr+6b6EWrK66hb5Aghtsn8BtKoBD4cg0TKoJLhL2ucQd Mb9iXnu1PLoDvDTONC1rx8VS/KHBPM673YDq6+IxM/cuXLnDYi8oPywvc1KGdtwW gj2KL9Kfqk3D7dbbZEvJIdgzXUrCHxJUARrSyGmpoyb+/So3xEfWUtJyv2UL/H8j d9IPJ+uZEbak7eoQj7kDLdbpy6kmbk8E07dK+Ete9M//qhpCgWO2095rxVKKakgD HTFeXdTe78CyBarwcNX1dr8/5UO83UPcSbaCBee9BS/fUr+PeDfZ6l5M8WHuQvyX l6ZuQ14r+DKXIE0GHHfc5EaS+hZsm0hFC0I7fr75S+dde8XjXrS6Aq2qBAXCv+6+ PRUBmBMc7XSEfEAAIST80F971w44JRextOksMr+O7S/gCKGDuWPWJjCkUlaklkZX MURyrfMdRmjhQ10buzDp/IF/OzdY8lqzs+iT1fM79PJ9Kmoy0zqXBEw38VbzO20b POTKCcBmob6hoMed29x3MNrkRTnojIsJDNPtafQzdW8IwAzykyZfnLJWLhiaC6Cr xcfHmJzLMWtItsmit3rodAcr14mMfS8Qj3zG/P3OFGroj8gM7gdYHx299/4TUGa8 iS8Rkmq6Dg00dJfwlgY3VrP4Sf5yTvZrewp21WV1aPfhuYPKzB8= =EvAC -----END PGP SIGNATURE----- --elafskrj3fxxew2c--