From owner-freebsd-stable@freebsd.org Fri Feb 19 21:07:48 2021 Return-Path: Delivered-To: freebsd-stable@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 C1D4853E877 for ; Fri, 19 Feb 2021 21:07:48 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 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 4Dj40h11Z5z3JfW for ; Fri, 19 Feb 2021 21:07:47 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x735.google.com with SMTP id m144so6916477qke.10 for ; Fri, 19 Feb 2021 13:07:47 -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=x4W7q30UOj9SJrXY2omB0v7BDxU1XfzyXZ9rNV2IrMM=; b=nP1k5n7hTQSm+bGa1RFjwuFlZw+Gf+JG7vyTFlIJ26MqH0XOFqBtN9B6By5pwrrJZD N40qWSVIcsFkuhdxM4BVpk5UMccxUJfgCv6D0291N5VxahWiy4/TKg+SExRPgEd5vFAi e7mHcv3Y0i48sXmw/eWsMY1XGchceWD/ExS9DXrUayyIIuLCfEybtSnuLvbb+hIyZncs L3yKlqRP3C5z4Q2oSv5VtoP6lmJna28AXssAH5tIvWZPFpKlddM2XZVYGCBQI9BLJ5bq kbqglbQfUblTu0SFrNp4dQjVqwEUk/grj6RTzNdvUznlt3Ok7UDdIIQjfxUW2eepeRCV ZiMw== 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=x4W7q30UOj9SJrXY2omB0v7BDxU1XfzyXZ9rNV2IrMM=; b=RZpKzQ6TWkpc4TovRoxeXoks568wdcDHd6Yo0yNm6zrTajhZDU5y3PlyS1NXGS8oKA /RVlJgDC4wFOaDPdxjm+lte8MURouZHQQnIvwGRwXGrOlqkAtQU4cR2LF/llFecefdp9 If1Men5wXlnrzj2jxKkbaNcdAu5D/l+7QZcsbLCyjlhQktvbzaWU/zk+VNQWOY/5/8LT BojOfz2GXDPiNMtcDeRNfKd31B3Btn84u+K50NZcpaCgQIMk1RtU/zs5zuTKDd9BkRlf Pe43Sr+PQxB/vsU1B/wg/pWIvsltx4N8PN37XV7EoZ1MrChFI96cpqKIdmquMJTMOUxD mLCA== X-Gm-Message-State: AOAM532TUAzB2sEDNxsZhFopqa1dEUXjO8ijA0vb3LZ6N1XCqUDJK9Iu g2upiT0tHmkvlKUORyjlWagJ4toJHkgZQ5KJeIx9YmQ6HshTcQ== X-Google-Smtp-Source: ABdhPJztbRLTe6XyDjf3I0w6NF2DLM1m936pTri5tyBeghUsfUTGcDGPWTq2V9JhmidMN+4F4D7Bml3VfN+gw1+eCqU= X-Received: by 2002:a05:620a:12d1:: with SMTP id e17mr11153043qkl.89.1613768867046; Fri, 19 Feb 2021 13:07:47 -0800 (PST) MIME-Version: 1.0 References: <2027600.x0N0T6uNKo@no.place.like.home> In-Reply-To: <2027600.x0N0T6uNKo@no.place.like.home> From: Warner Losh Date: Fri, 19 Feb 2021 14:07:36 -0700 Message-ID: Subject: Re: FreeBSD 13/stable and zpool upgrade To: Greg Rivers Cc: FreeBSD-STABLE Mailing List X-Rspamd-Queue-Id: 4Dj40h11Z5z3JfW X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=nP1k5n7h; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::735) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-3.00 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; TAGGED_RCPT(0.00)[freebsd-stable]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-stable@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::735:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::735:from]; NEURAL_HAM_SHORT(-1.00)[-1.000]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::735:from]; RCVD_COUNT_TWO(0.00)[2]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[freebsd-stable] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.34 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, 19 Feb 2021 21:07:48 -0000 On Fri, Feb 19, 2021 at 1:49 PM Greg Rivers via freebsd-stable < freebsd-stable@freebsd.org> wrote: > On Friday, 19 February 2021 12:24:24 CST Kurt Jaeger wrote: > > > > Unfortunately it contains an old version of the boot loader: > > [...] > > > We should be better about upgrading boot blocks, but EFI is kinda new > and > > > kinda different than the other out-of-root-filesystem boot blocks > we've had > > > in the past, so there's still some rough edges. > > > > We run many systems at remote sites. If we can't remotely upgrade > > without drama from 12.x to 13.x, that would be a catastrophe. > > > > Any chance this can be fixed before 13.0-REL ? > > > Informed by reading the bsdinstall(8) scripts, I've been creating my own > boot1.efifat thusly: > > #!/usr/bin/env sh > TMPDIR=/mnt > rm -f /boot/boot1.efifat > newfs_msdos -F 32 -c 1 -L EFISYS -C 200m /boot/boot1.efifat > MD=$(mdconfig -f /boot/boot1.efifat) > mount -t msdosfs /dev/${MD} ${TMPDIR} > mkdir -p ${TMPDIR}/efi/boot ${TMPDIR}/efi/freebsd > cp -a /boot/loader.efi ${TMPDIR}/efi/boot/bootx64.efi > cp -a /boot/loader.efi ${TMPDIR}/efi/freebsd/ > umount ${TMPDIR} > mdconfig -d -u ${MD} > > Then I use `gpart bootcode -p /boot/boot1.efifat ...` as usual. > > To avoid confusion and errors, I think a proper boot1.efifat should be put > back into the base system so that people don't have to track the above > recipe (which is likely to change). > There's no safe way to do this. The old process has been deprecated because it is dangerous and inflexible. For upgrading from an old-style installation, the new process is actually fairly simple: mount -t msdos /dev/daXsY /mnt cp /boot/loader.efi /mnt/efi/boot/bootx64.efi umount /mnt Though if you're using eftbootmgr to select things, you'll need to copy to efi/freebsd/loader.efi. Different BIOS vendors have a number of different bugs that make this trickier than it should be, alas. Warner