From owner-freebsd-current@freebsd.org Fri Jan 18 17:11:03 2019 Return-Path: Delivered-To: freebsd-current@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 6E4C114A4760 for ; Fri, 18 Jan 2019 17:11:03 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82f.google.com (mail-qt1-x82f.google.com [IPv6:2607:f8b0:4864:20::82f]) (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 83CA497C11 for ; Fri, 18 Jan 2019 17:11:02 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82f.google.com with SMTP id l11so16060462qtp.0 for ; Fri, 18 Jan 2019 09:11:02 -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=j9Ncs5OlA6TFx5DMbaonNCEmH16XBhZ9fRrDPlKjYVU=; b=estU+DCqE2qOHUG63c5QEGm2OpUftx7+IvKbPpL37LJuIiAcJu6J9F1hk6usliecCV UmcXmwFryoT06iAU1xEV6LPqTLhV48tsOlG5miXvJFj6gy+n4p//eTMVf9Tzx4V97aat U8jtWYK5R8zBln6zmF/6NMmlxlI2MeGojV02dQAqfF+NusWTHaqUW0FT3zmYudXapHxi GDbVXyhqhYWxovE+3kHI2Pr9Z0udP4Q6inONd9FQwbWe+CTSalIteifZU5X9d5fX58L1 0epdiDffpovx/E3WvSSorll56qj+bdAc8n2AZcIYxxvOGbKxnIDHIFn6uJ3LsLaWtwXO Terg== 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=j9Ncs5OlA6TFx5DMbaonNCEmH16XBhZ9fRrDPlKjYVU=; b=HowL3V/mxdhYCz0XOKhWiDWAfb4As9m8q/3uenMRICKdss9Knrze0Y2GPPRl+SlTy8 QokBES511eEyay71dgiULcaBsGA7vhai+q4TdYfTEWRMrvFU1dV/P6boBuiYvmgwz+KA BWfZezjUV6foxDaNkiH543/6YIZXYnZwIn9347cyZaFnZkWaIUekVEgtJclkFPr2HM0I DQPpRGBaEEyb9qXdEUGP4r+90jZPgVDFyktvqZMS96sxkbAG9rKqLDL3O0y9L1I7nXCn /e7i81Ju3pxK19a7RcLf/a8h9TZ4ucGfu8MjWAB11O2mhTGjtFz7OOpLbwf0pH2o/ZjA eGGg== X-Gm-Message-State: AJcUukeZiaryAIolGWvDuLYlyAQ7NmZwOucAZdnB9J2vCtYF+tWoT5uY J5xZcPESGspOYINfJnuDxzuQS9cEQaq4bvdjjX2UbdMl X-Google-Smtp-Source: ALg8bN6mnbay1GGilmRmjJBn1fGC4ZLDM97uyTTb2MMPsxb0GOGKjyhn1E/0tuRUj0fjo7Gii+eP1BSzRryDkOwXkTo= X-Received: by 2002:ac8:3f2f:: with SMTP id c44mr16802606qtk.33.1547831461263; Fri, 18 Jan 2019 09:11:01 -0800 (PST) MIME-Version: 1.0 References: <201901181527.x0IFRMdm055990@pdx.rh.CN85.dnsmgr.net> In-Reply-To: <201901181527.x0IFRMdm055990@pdx.rh.CN85.dnsmgr.net> From: Warner Losh Date: Fri, 18 Jan 2019 10:10:50 -0700 Message-ID: Subject: Re: UEFI, loader.efi and /boot.config To: "Rodney W. Grimes" Cc: Kurt Jaeger , Rebecca Cran , FreeBSD Current X-Rspamd-Queue-Id: 83CA497C11 X-Spamd-Bar: ----- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=estU+DCq 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)[]; RCPT_COUNT_THREE(0.00)[4]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; 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)[f.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.84)[-0.837,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.64)[ip: (-8.94), ipnet: 2607:f8b0::/32(-2.37), asn: 15169(-1.82), 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-current@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Jan 2019 17:11:03 -0000 On Fri, Jan 18, 2019 at 8:27 AM Rodney W. Grimes < freebsd-rwg@pdx.rh.cn85.dnsmgr.net> wrote: > > On Fri, Jan 18, 2019, 12:49 AM Kurt Jaeger > > > > Hi! > > > > > > > With a recent change I made for UEFI, we now install loader.efi onto > the > > > ESP and don???t run boot1. That means that /boot.config is no longer > read, > > > and so console settings need to be put in /boot/loader.conf > > > > > > Which change is that ? > > > > > > > Moving from boot1.efi to loader.efi. loader.efi never looked at it. > > loader.efi honors the uefi env vars to set the console which replaces the > > old way. > > > > So it sounds like what we need is some documentation that covers: > > a) If your using mbr/bios boot and /boot.config you need to move > your settings from /boot.config to /boot/loader.conf > You don't need to do that. There's good technical reasons you might want to keep what you have because of order of evaluation. The legacy BIOS handoff need not change at all. > b) If your using uefi boot and /boot.config you need to migrate > your settings from /boot.config to uefi env vars foo bar and zep > > Or did I get loss in the twisty maze of changes? > If you migrate from using boot1.efi (which is on the way out: 13 will be its last release and it won't be used by default anymore) to loader.efi (which is used by default as of recently) you need to do something if you set your console via /boot.config (or /boot/config). Both boot1.efi and loader.efi automatically honor whatever the console is set in UEFI to. loader.efi has always allowed you to change it when loader.conf is read in. loader.efi has been further enhanced to guess the proper FreeBSD device from the UEFI variables for the console when not overriden by loader.conf. It's all a cluster of a mess, to be honest, and what the handoff formats are between the different stages is, at best, poorly defined. Oh, and to add "fun" to the mix, you can get the same /boot.conf behavior from loader.efi (and I think boot1.efi) if you pass load options into the BootXXXX variable (though I don't think that efibootmgr does that now: it can display them, but I don't think it encodes them). This is done because of the current handoff between boot1.efi and loader.efi. Chances are good we should (a) document this and (b) enhance efibootmgr to grok setting options here because that would be the natural successor to /boot.config for people that have super-special needs that the defaults don't cover. Nailing down all the issues like this is why I didn't retire boot1.efi in 12. Warner > Warner > > > > > I was wondering if people will expect /boot.config to still be read and > > > so code should be added to loader to continue to parse it, or if > > > loader.conf can be considered the correct place and boot.config > forgotten > > > about? > > > > > > I have quite a few systems using /boot.config, but can cope if I know > > > about this. > > > > > > -- > > > pi@opsec.eu +49 171 3101372 One year to > go ! > > -- > Rod Grimes > rgrimes@freebsd.org >