From owner-freebsd-virtualization@freebsd.org Thu Jan 23 11:32:12 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 0E5CD2362B7 for ; Thu, 23 Jan 2020 11:32:12 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 483Kqv4V85z4VwK for ; Thu, 23 Jan 2020 11:32:11 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: by mailman.nyi.freebsd.org (Postfix) id 9A27C2362AF; Thu, 23 Jan 2020 11:32:11 +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 99EB82362AE for ; Thu, 23 Jan 2020 11:32:11 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 483Kqv3Nbsz4VwH; Thu, 23 Jan 2020 11:32:11 +0000 (UTC) (envelope-from subbsd@gmail.com) Received: by mail-lf1-x130.google.com with SMTP id m30so2007819lfp.8; Thu, 23 Jan 2020 03:32:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=bxNA8WIt64b305OzhwxtMsy7om+EuX8CzBgKfp8LN70=; b=Zy6I/TyS+vHNlRKHq3oUcWMnIekAKTYvqc//QhPdeEJ8MtOgbn0a35k9Ou1SHuwcm6 t3+goFXNNh8ot71oBJS8FuviVoeYe5fb/gVg3ZWACoVDJbYFZ9fswsQfgl1+o0AdUgPG t0fnJUFPT4aukrhGultWij4AEbtYHETNyoA57XJIcKzWBhPTBf7umtYRZg+9BOC9Bvqo vvGJT/7FFBTqetwwt8XFsXNb8kON55WIB0ACpae7Ro4K4B2do88gVFr/9SWi3npbjKZq mxib593ZdPXo/f5XSR+Sh+0eB2K9Fa9QecKi2gcWMtq1wlGR7dtEA+5pyRxtmTbxbyWF DCFg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=bxNA8WIt64b305OzhwxtMsy7om+EuX8CzBgKfp8LN70=; b=gO0l3EF7rgOIgfZUTX1LVjhVNq1If9yw7VZfT4qbW3/ZmsgEFBSmRijS1SSYEIqR3j TEmaAdGM/osjAgcZLNGTivvLLI8IWQGygaNsA4lnoY005GYkMZS5BhuvvZ9c+qj8+DXg fRDXQ8NSeKBKwitM92IoJlv6tGe/HhKY3vG5N9lSmGB+IZyrzlK0SzJpOLQUZ0kx4ZP5 /6qxrfT+WbDq77XJtboYD2NGQbfyRWDqp/Ms1s4dQQ8AHhYSTpfHjJU6UNAZRpXg+Drb vbF7YaHUQ7Q8VW91H1tWzK09RraGeUUwEXsvnBJMaOTYKy26Aljmr052adgcs69ENazP zPRg== X-Gm-Message-State: APjAAAUuwJ4ytxBWr6f4H3dlPkLu28mwmo+9pCjmcS+sudp/8EBgpszU eRuJeFS1KPO7NuNIwrISJ5sTaqCIkvE4Qg5pmLewEGps X-Google-Smtp-Source: APXvYqxGVLTlEmOOm4uYXrMcSwnmYr78OVviRGOLLxQcrVT5PbaPy2v8s5cFfDU3XUpqu4rg3xAnK1DFUK1YHLC3wD4= X-Received: by 2002:a19:8b89:: with SMTP id n131mr4535623lfd.14.1579779129402; Thu, 23 Jan 2020 03:32:09 -0800 (PST) MIME-Version: 1.0 References: <20200116090442.xgmiwlaiwwyajqgk@atuin.in.mat.cc> <20200123074906.bhbpr2cbdmeeqwvz@atuin.in.mat.cc> In-Reply-To: <20200123074906.bhbpr2cbdmeeqwvz@atuin.in.mat.cc> From: Subbsd Date: Thu, 23 Jan 2020 14:31:58 +0300 Message-ID: Subject: Re: Bhyve and UEFI NVRAM To: Mathieu Arnold Cc: virtualization@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 483Kqv3Nbsz4VwH X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-6.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] 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 11:32:12 -0000 On Thu, Jan 23, 2020 at 10:49 AM Mathieu Arnold 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