From owner-freebsd-stable@freebsd.org Fri Jan 11 22:51:12 2019 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 761F814A086C for ; Fri, 11 Jan 2019 22:51:12 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from mail.in-addr.com (mail.in-addr.com [IPv6:2a01:4f8:191:61e8::2525:2525]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8F8BA8BF7F; Fri, 11 Jan 2019 22:51:11 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from gjp by mail.in-addr.com with local (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gi5du-0005e5-CD; Fri, 11 Jan 2019 22:51:10 +0000 Date: Fri, 11 Jan 2019 22:51:10 +0000 From: Gary Palmer To: Warner Losh Cc: Kyle Evans , freebsd-stable stable , Stefan Bethke , Jonathan Chen Subject: Re: Trouble booting from EFI with 12-stable Message-ID: <20190111225110.GB45377@in-addr.com> References: <2E0A45C1-1E0A-42FB-A403-04EF611DB812@lassitu.de> <97B2B194-D1B6-4CC0-BAC2-8167ECDB3182@lassitu.de> <1B65638D-C68B-4995-9170-DB34D8051B21@lassitu.de> <20190111222116.GA45377@in-addr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on mail.in-addr.com); SAEximRunCond expanded to false X-Rspamd-Queue-Id: 8F8BA8BF7F X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-2.96 / 15.00]; local_wl_from(0.00)[freebsd.org]; NEURAL_HAM_MEDIUM(-0.99)[-0.994,0]; NEURAL_HAM_SHORT(-0.97)[-0.975,0]; NEURAL_HAM_LONG(-0.99)[-0.993,0]; ASN(0.00)[asn:24940, ipnet:2a01:4f8::/29, country:DE] X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Jan 2019 22:51:12 -0000 On Fri, Jan 11, 2019 at 03:47:45PM -0700, Warner Losh wrote: > On Fri, Jan 11, 2019 at 3:22 PM Gary Palmer wrote: > > > On Fri, Jan 11, 2019 at 01:18:35PM -0600, Kyle Evans wrote: > > > On Fri, Jan 11, 2019 at 1:15 PM Jonathan Chen wrote: > > > > > > > > On Sat, 12 Jan 2019 at 07:55, Stefan Bethke wrote: > > > > [...] > > > > > The UEFI man page has a good explanation of which files are involved > > in booting: > > > > > > > https://www.freebsd.org/cgi/man.cgi?query=uefi&sektion=8&manpath=freebsd-release-ports > > > > > > > > > > I mounted the ESP and copied /boot/boot1.efi to > > /boot/efi/EFI/BOOT/BOOTX64.EFI. Surprisingly, the new boot1.efi is much > > smaller than what I had before (according to the timestamp from November), > > but using that, booting seems to be restored. > > > > > > > > > > # grep efi /etc/fstab > > > > > /dev/ada0p2 /boot/efi msdos rw,noauto 0 > > 0 > > > > > # mount /boot/efi > > > > > # ls -l /boot/efi/EFI/BOOT/BOOTX64.EFI > > /boot/efi/EFI/BOOT/bak/BOOTX64.EFI > > > > > -rwxr-xr-x 1 root wheel 81920 Jan 11 18:43 > > /boot/efi/EFI/BOOT/BOOTX64.EFI* > > > > > -rwxr-xr-x 1 root wheel 410112 Nov 25 16:27 > > /boot/efi/EFI/BOOT/bak/BOOTX64.EFI* > > > > > > > > While the uefi(8) man page suggests that boot1.efi should be used, > > > > loader.efi can also substituted. I believe the release images use > > > > loader.efi instead of boot1.efi, as it's slightly more efficient. > > > > > > > > > > Indeed, boot1.efi is a hack that's going to get kicked out of the tree > > > in due time. > > > > Can I request a clarification in the man page? At least in 11.2 the > > uefi(8) man page state > > > > -- QUOTE -- > > 2. boot1.efi reads boot configuration from /boot.config or > > /boot/config. Unlike other first-stage boot loaders, > > boot1.efi passes the configuration to the next stage boot > > loader and does not itself act on the contents of the file. > > -- QUOTE -- > > > > It's not 100% clear, although implied by the fact that the next step > > looks for freebsd-ufs or freebsd-zfs partitions, that the boot.config is > > loaded from the ESP (at least I'm guessing that's where it's loaded > > from). Could the location of where boot.config is loaded from be > > clarified please? > > > > In 11.2, boot1.efi was used to load the next stage of the boot process > (which was /boot/loader.efi off either a UFS or ZFS filesystem based on a > number of heuristics). The boot.config was loaded from the same filesystem > loader.efi was loaded from, and not the ESP. Hi Warner, OK, how does boot1.efi know where to look for boot.config? Are steps 2 and 3 reversed in the man page? Thanks, Gary