From owner-freebsd-questions@freebsd.org Tue Mar 2 07:43:17 2021 Return-Path: Delivered-To: freebsd-questions@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 5368355F066 for ; Tue, 2 Mar 2021 07:43:17 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) (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 4DqTdJ2cHVz3FVR for ; Tue, 2 Mar 2021 07:43:16 +0000 (UTC) (envelope-from grahamperrin@gmail.com) Received: by mail-wm1-x329.google.com with SMTP id n22so1369699wmc.2 for ; Mon, 01 Mar 2021 23:43:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:references:from:cc:message-id:date:user-agent :mime-version:in-reply-to:content-transfer-encoding:content-language; bh=UkdQChYmO48zsX3w7fT8NhDqTzWXGVNNysZMjoJhQn4=; b=LD/FjIFDuL6Y3MJN7IbEsJadAuD4Kj9vhmARftF/KUuag1VIvt9yorleDP4scBW5dP tNYBGnTf6NJRtAFrRgPVmWV7fGt05IMaUUWWpM+mOIwT5/5vFWCIdyW9uNNw962eIKAv utgtO6Mj/0A1ipkPaMsLAAlYr40mvbCZvuC8n857r2wZaLjzwoxwFPHIFAWsm3Bbl2OH TslpAt8uBINnviiuhe9IwIQHQcmSBPRcQZy0OUE1yNmSUw3cBCGdtgJYqF76nZDFJUmv L89fYAnwKVDtEss/tepbfaQNS3doxLpNlXZSpuFs/ZOZ312xEZxY2jQHuLbzp0LAfmOb fLWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:from:cc:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding :content-language; bh=UkdQChYmO48zsX3w7fT8NhDqTzWXGVNNysZMjoJhQn4=; b=Qc/kR+gQ+orE28ezP/VfHU0j6SG+4YiyoTqC0Qtf+SwN1sWmzM7I0jm3REQ9ls1USZ 3cazShZwl3NW/LcX/N85I03uWuxj2alKpesC0YoEyCdZ90U3peM7TThkR2tyHXOhqvfH Fb5i2Zzp7abop1rvarg54cQP6G7c25ta9Iq5qLudLX7v+PwUCVhzcNcdgH3c8Pz9t4/o mErkplcE9llzRjlMO8je3191RiEWmun/cJKffkZWYDqtL8yM8oDQWz4YpczNFDgN4Cy7 HI+2Kjd/OeULO+VtV5+n9tyY5U4YU9B6LOry4udYCjQyRPMNB6bvhxzqH+buX/9RS8yq 3Z9w== X-Gm-Message-State: AOAM533x5QExBHEzKd6SbIwl0Id2ZSiKdP00725pRxzrA+wGWLMORg2n Hnu6Soly0zXMcMtqk3usMavEcC2PaRCXkQ== X-Google-Smtp-Source: ABdhPJxhMkpi/8NZwRvOyZPuw168f8IPrqqLQXhCR/QHJP06M0JuFzPyPmvHhF9Q3XeRs7IESelQJA== X-Received: by 2002:a05:600c:4844:: with SMTP id j4mr727127wmo.179.1614670994718; Mon, 01 Mar 2021 23:43:14 -0800 (PST) Received: from [192.168.1.13] (88-105-96-80.dynamic.dsl.as9105.com. [88.105.96.80]) by smtp.gmail.com with ESMTPSA id v6sm28144141wrx.32.2021.03.01.23.43.14 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 01 Mar 2021 23:43:14 -0800 (PST) Subject: System updates/upgrades: single user mode, and chroot approaches To: freebsd-questions@freebsd.org References: <20210228023827.f68e6136d688c0a37206c883@3dresearch.com> <20210228120313.cdb53cab429a38fdf9817d0d@3dresearch.com> From: Graham Perrin Cc: Warner Losh Message-ID: <5587a9c8-519e-f5db-96cd-d34c29600fbc@gmail.com> Date: Tue, 2 Mar 2021 07:43:13 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-Rspamd-Queue-Id: 4DqTdJ2cHVz3FVR X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=LD/FjIFD; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of grahamperrin@gmail.com designates 2a00:1450:4864:20::329 as permitted sender) smtp.mailfrom=grahamperrin@gmail.com X-Spamd-Result: default: False [-2.01 / 15.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; TO_DN_SOME(0.00)[]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2a00:1450:4000::/36]; RCVD_COUNT_THREE(0.00)[3]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; RECEIVED_SPAMHAUS_PBL(0.00)[88.105.96.80:received]; FROM_EQ_ENVFROM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2a00:1450:4864:20::329:from]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MID_RHS_MATCH_FROM(0.00)[]; ASN(0.00)[asn:15169, ipnet:2a00:1450::/32, country:US]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; NEURAL_SPAM_SHORT(0.99)[0.987]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-questions@freebsd.org]; SPAMHAUS_ZRD(0.00)[2a00:1450:4864:20::329:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2a00:1450:4864:20::329:from]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[freebsd-questions] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2021 07:43:17 -0000 On 28/02/2021 23:52, Garance A Drosehn wrote: Re: Panic after updating from source > On 28 Feb 2021, at 13:04, Michael Sierchio wrote: > >> … if you don't installworld before >> booting, you can have a mismatch between userland and kernel interfaces. >> >> make buildworld && make kernel && make installworld && reboot >> >> that always works for me when following a -STABLE branch. > It may happen to work for you many times in a row, until the day > it does not work and then you're screwed. The official instructions > state that you should always reboot into single-user mode before > doing 'make installworld'. > > The instructions are what they are based on a lot of experience. > … > > We have frequently seen people who are furious when their system > breaks after they've upgraded from source, and frequently the reason > their system broke is that they "got away" with cutting corners for > 20 times in a row. And then they hit the first time that they were > not able get away with cutting corners. And they always blame us > developers when in fact they're not following instructions. > > To quote from /usr/src/UPDATING: > > ... Then, carefully follow the full procedure documented below > under the heading "To rebuild everything and install it on the > current system." > Specifically, a reboot is -> required <- after installing the > new kernel before installing world. While an installworld > normally works -> by accident <- from multiuser after rebooting > the proper kernel, there are many cases where this will fail > across this upgrade and installworld from single user is > required. > > … Thanks to Garance for these insights. I do routinely read the upper sections of /usr/src/UPDATING however until now, I never realised the existence of the COMMON ITEMS section at the foot of the page, below the 20131010 line. Not realised because I have not used FreeBSD for so long. I stopped paging down, near a point in time before which I never updated. /usr/src/UPDATING might benefit from a hint, near the head of the page, to read the COMMON ITEMS section at the foot. It's remarkable that makes no mention of single user mode. ---- Upgrade FreeBSD with ZFS Boot Environments | 𝚟𝚎𝚛𝚖𝚊𝚍𝚎𝚗 – there's a chroot approach to streamlining, where freebsd-update(8) can be used. Please, can you think of any special precautions? Re: (FreeBSD pure in the midst of a discussion about FreeBSD-based helloSystem) if I'm not mistaken, there's an edge case risk of shooting oneself in the foot if the user does follow the on-screen instruction:     Run `/usr/sbin/freebsd-udpate fetch` first. – at a point during the streamlining where fetch and install need not (probably must not) be performed. Regards Graham