From owner-freebsd-stable@freebsd.org Fri Jan 11 22:47:58 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 3121814A0569 for ; Fri, 11 Jan 2019 22:47:58 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E1A158BB6F for ; Fri, 11 Jan 2019 22:47:56 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82b.google.com with SMTP id l12so20620013qtf.8 for ; Fri, 11 Jan 2019 14:47:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=efQJ3lh20o6SYde2J2jlEiuUMNSNiojUjsqeHjEivYE=; b=ZSqINb381DqpWXMGBctdSu9vCOjVaFMHl7bWTN+ZtnPduIyuSJsTliX+NOOs5XrfHA JqRVvSusxCr1eghyPd+YKBEI4NcKk5fflRattMhYNXzK+/HebtFKtPz8IV6whuzD+gpp uxQvb4vkywFU3zVVvo0+AHuWe7KLN4Zula05FRc1uKmZ22xpL7j3T2VImdwnOz3kAw2h 7h4bO2qVmE8TYASo3akeSh7h7ZQANI2ELZEtN5bd4DXbBomvcalFUx08eVX7gtNWdhwd cmF1qaieWPGGUNY4E0zqtYmmI3Vl0tZpY5nlcAxw0taTsQP71TB7cdQLBPQEtHmhLx7e VxFQ== 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=efQJ3lh20o6SYde2J2jlEiuUMNSNiojUjsqeHjEivYE=; b=X3kI410o2vTTDH44fAiMbbs8IfP0gj0Ih0LmSLtpgLzniO1N4xBS+MjdTmENOQ0Qag wjNXarfZB7z8ZkZjlx0t5aRChmae/o43132/6g+l35X9N7mgHPd+ChY76WWQC7xP2PEF Gu7eHY/DsjnOoTDgmI3ExKjMCfhU5K/7K4FaflB9npxGzRlK+q4sNB0rTJ7/a1UKt1O9 w/sLqq1OVdyE2j6zasGeHMcGpKE1pNuFiZwz9KR66duj3OlQSaKTf0FvlNG50gqU0DLg h50RypChiMWMSJZXzEZYYG89V8ghu4FxilCpzm24iyNb9qZ4M8y1njAdQ1d7Qc3rwtix TjTQ== X-Gm-Message-State: AJcUukcqPy19DI1j2SCaegookALxoAMOgFKzSaBjUlsykhfzgoRrLdNC THB+UPMxpRwC3JDsRhBBg2VVe6Li+ZsFxoRJCXaHkA== X-Google-Smtp-Source: ALg8bN4H7wXXWDk6aHk64p9jNzcQXRnsWuukoRea/jNYUQpzvJjuh99HPjeNtgTO+9nlQ7hKDyjhGJxKveZMVL+Dtdc= X-Received: by 2002:a0c:bd15:: with SMTP id m21mr15709733qvg.57.1547246876160; Fri, 11 Jan 2019 14:47:56 -0800 (PST) MIME-Version: 1.0 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> In-Reply-To: <20190111222116.GA45377@in-addr.com> From: Warner Losh Date: Fri, 11 Jan 2019 15:47:45 -0700 Message-ID: Subject: Re: Trouble booting from EFI with 12-stable To: Gary Palmer Cc: Kyle Evans , freebsd-stable stable , Stefan Bethke , Jonathan Chen X-Rspamd-Queue-Id: E1A158BB6F X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=ZSqINb38 X-Spamd-Result: default: False [-5.49 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; MX_GOOD(-0.01)[cached: ALT1.aspmx.l.google.com]; RCVD_IN_DNSWL_NONE(0.00)[b.2.8.0.0.0.0.0.0.0.0.0.0.0.0.0.0.2.0.0.4.6.8.4.0.b.8.f.7.0.6.2.list.dnswl.org : 127.0.5.0]; NEURAL_HAM_SHORT(-0.94)[-0.939,0]; R_SPF_NA(0.00)[]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; IP_SCORE(-2.54)[ip: (-8.54), ipnet: 2607:f8b0::/32(-2.34), asn: 15169(-1.76), country: US(-0.08)]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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:47:58 -0000 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. Warner