From nobody Mon May 09 06:25:44 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 1B4A91AB889A for ; Mon, 9 May 2022 06:26:02 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: from mail-io1-xd2b.google.com (mail-io1-xd2b.google.com [IPv6:2607:f8b0:4864:20::d2b]) (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 1D4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KxWQK3Dqfz3vcr for ; Mon, 9 May 2022 06:26:01 +0000 (UTC) (envelope-from michaelsprivate@gmail.com) Received: by mail-io1-xd2b.google.com with SMTP id c125so14259977iof.9 for ; Sun, 08 May 2022 23:26:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=sVSSUKYYxshkFWfluA/1a7FeoQ8bdPEYwsrLQkq357E=; b=LWbfyqiEHMSif+bc+ieUEQ0wSVz2kC+5HQ2YnsoihmNY6eeiKWNxOQ/4zBmM2VkbPB XJ4c+rXgkSvaSEcbIn3cs45yPPtTyohrfQStC3Uu7Fzxz28xOrDNcifaHD1purcXLnrV frlMan22ANtog7y3f0iB63CRXE6Ul5Xc7d9eb3hjHuBQSZ4GKfKC3/zeUE9JRtmAIecY Fgra6rji2Q+Z0wk04avJWVuj6y4+xNENTS44qYia3zinoQ3AkhwYZTAlhe30y8zvU7hU YQLHUREPTZR+3jkD10wrIJehP1LhqXzxyvaqersLHU49ZLWJvXK8t7y8kRqehsGY6OJP 7tyQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=sVSSUKYYxshkFWfluA/1a7FeoQ8bdPEYwsrLQkq357E=; b=l+VLY7a5NZZcQiBSBCPydkcVAVS6VXivFavXsV30HMNKzmYsclnYO+9gbSPUVPYOT4 0cG/hbpvnKvl7UM4TU/G6Il0gfDyIof0e5P/yEXflSTkv1pus2wSxe7pzlds6BIECF80 Ld7wfH5gjmVszU/DXeg1/T6J7EuS5+QIkq+mDz7IxUyaZUmBQFMsCm5zK4p9pYebEAnG gcir9W76yrHii6j/fl5KByRaCcyqvtlTbaZsW3FKSP3qEODnSdb9YRACOWYpmMM4FRSO toIPvIO9eem62QTLRxtbf+V/4ZSab9mWcqpEIM1MgaQ/kxqeRd/GOyah1UTDm/zc4h58 qsKw== X-Gm-Message-State: AOAM530e4esfVgBCIngsc2c2Gq+AoEymKSX3lCDhI/DDhVHGUTOg4D9U B4n7L9HYpk4/MZ6tq9AAa7EV05OQAry5tX6BQr0NZbCMo1eUY0ZI X-Google-Smtp-Source: ABdhPJyHTKCiaOYp6NT9Tol9wXZLtVc/mEhPSq63uTZWxO38g2Rige7Oxxx3afjxhTvoQQsmXGj8gsv8c37E9X6Tgic= X-Received: by 2002:a6b:c808:0:b0:657:c3ee:623c with SMTP id y8-20020a6bc808000000b00657c3ee623cmr5868823iof.48.1652077555254; Sun, 08 May 2022 23:25:55 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: In-Reply-To: From: Michael Schuster Date: Mon, 9 May 2022 08:25:44 +0200 Message-ID: Subject: Re: FreeBSD, boot environments and /dev To: Wes Maag Cc: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="000000000000d28da405de8e4748" X-Rspamd-Queue-Id: 4KxWQK3Dqfz3vcr X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20210112 header.b=LWbfyqiE; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of michaelsprivate@gmail.com designates 2607:f8b0:4864:20::d2b as permitted sender) smtp.mailfrom=michaelsprivate@gmail.com X-Spamd-Result: default: False [-3.99 / 15.00]; FREEMAIL_FROM(0.00)[gmail.com]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MID_RHS_MATCH_FROMTLD(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; RCPT_COUNT_TWO(0.00)[2]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; NEURAL_HAM_SHORT(-0.99)[-0.994]; FREEMAIL_TO(0.00)[gmail.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+,1:+,2:~]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20210112]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[freebsd-current@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::d2b:from]; MLMMJ_DEST(0.00)[freebsd-current]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[] X-ThisMailContainsUnwantedMimeParts: N --000000000000d28da405de8e4748 Content-Type: text/plain; charset="UTF-8" On Fri, May 6, 2022 at 12:15 AM Wes Maag wrote: > > > On Thu, May 5, 2022 at 4:10 PM Michael Schuster > wrote: > >> Hi all, >> >> while still working (slowly) on an answer to my own question on the >> right workflow to keep current up to date reliably with boot >> environments, I noticed that after creating and mounting a new BE, >> that new BE's /dev (eg /mnt/dev) is very sparsely populated: >> >> [22:44:45: ~ 0] $ ll /mnt/dev >> total 20 >> 9 dr-xr-xr-x 4 root wheel 7 Apr 18 00:35 . >> 9 drwxr-xr-x 23 root wheel 30 May 5 22:44 .. >> 1 drwxr-xr-x 2 root wheel 2 Apr 18 00:35 fd >> 1 lrwxr-xr-x 1 root wheel 12 Apr 17 20:41 log -> /var/run/log >> 1 -rw-r--r-- 1 root wheel 63 May 3 22:19 null >> 1 -rw-r--r-- 1 root wheel 1 May 3 22:18 null.bak >> 1 drwxr-xr-x 2 root wheel 2 Apr 18 00:35 shm >> [22:44:48: ~ 0] $ >> >> (no matter whether I use "beadm create" or "bectl create -r") >> >> I can then mount devfs: >> # mount -t devfs devfs /mnt/dev >> >> and it will look (and work) as expected (eg for "pkg -c /mnt update" >> (*)) ... as long as the BE is mounted. >> When I try to boot from (into?) that BE though, it fails, and on the >> console I can see messages about missing /dev/... entries. I sneaked a >> peek into beinstall.sh, found no inspiration there, I'm afraid. >> >> I believe I noticed this apparent requirement to mount devfs >> separately not so long ago ... definitely this year, while I've been >> experimenting with boot environments for quite a bit longer. Was I >> just lucky all along, or did something change ... and, more >> importantly, how do I make my boot environments bootable again? >> >> TIA for hints, pointers, advice >> Michael >> >> *) I first noticed something was amiss when "pkg -c /mnt ... " >> complained about /dev/null missing, IIRC ... >> >> > getting /dev/null errors with pkg -c makes sense. I wouldn't expect /dev > to contain anything after a create. > > Why it is not populated on boot seems odd to me though... It's possible, > if you created a deep boot environment, you created a pool/ROOT/dev dataset > and it is overwriting the initial /dev from boot (I have not tested this > theory). Tough to say without more information about the BE layout, and > maybe a look at fstab. > > FWIW I typically run "pkg -r /tmp/be_mount.XXXX" after mounting with > "bectl mount" which should give you the same effect as -c without the > rooted devfs requirement > thx Wes and others for feedback, on or off list. For now I'd like to keep the simplest setting in focus: When I do: # beadm create new_BE # beadm activate new_BE # reboot I would expect new_BE to boot and also otherwise to all intents and purposes behave just like the previous BE I just "left"; similarly, if I skip the 'activate' step and select new_BE from the FreeBSD boot menu. thx Michael -- Michael Schuster http://recursiveramblings.wordpress.com/ recursion, n: see 'recursion' --000000000000d28da405de8e4748 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


On Fri, May = 6, 2022 at 12:15 AM Wes Maag <jwmaag= @gmail.com> wrote:


On Thu, May 5, 2022 at 4:1= 0 PM Michael Schuster <michaelsprivate@gmail.com> wrote:
Hi all,

while still working (slowly) on an answer to my own question on the
right workflow to keep current up to date reliably with boot
environments, I noticed that after creating and mounting a new BE,
that new BE's /dev (eg /mnt/dev) is very sparsely populated:

[22:44:45: ~ 0] $ ll /mnt/dev
total 20
9 dr-xr-xr-x=C2=A0 =C2=A04 root=C2=A0 wheel=C2=A0 =C2=A07 Apr 18 00:35 . 9 drwxr-xr-x=C2=A0 23 root=C2=A0 wheel=C2=A0 30 May=C2=A0 5 22:44 ..
1 drwxr-xr-x=C2=A0 =C2=A02 root=C2=A0 wheel=C2=A0 =C2=A02 Apr 18 00:35 fd 1 lrwxr-xr-x=C2=A0 =C2=A01 root=C2=A0 wheel=C2=A0 12 Apr 17 20:41 log ->= /var/run/log
1 -rw-r--r--=C2=A0 =C2=A01 root=C2=A0 wheel=C2=A0 63 May=C2=A0 3 22:19 null=
1 -rw-r--r--=C2=A0 =C2=A01 root=C2=A0 wheel=C2=A0 =C2=A01 May=C2=A0 3 22:18= null.bak
1 drwxr-xr-x=C2=A0 =C2=A02 root=C2=A0 wheel=C2=A0 =C2=A02 Apr 18 00:35 shm<= br> [22:44:48: ~ 0] $

(no matter whether I use "beadm create" or "bectl create -r&= quot;)

I can then mount devfs:
# mount -t devfs devfs /mnt/dev

and it will look (and work) as expected (eg for "pkg -c /mnt update&qu= ot;
(*)) ... as long as the BE is mounted.
When I try to boot from (into?) that BE though, it fails, and on the
console I can see messages about missing /dev/... entries. I sneaked a
peek into beinstall.sh, found no inspiration there, I'm afraid.

I believe I noticed this apparent requirement to mount devfs
separately not so long ago ... definitely this year, while I've been experimenting with boot environments for quite a bit longer. Was I
just lucky all along, or did something change ... and, more
importantly, how do I make my boot environments bootable again?

TIA for hints, pointers, advice
Michael

*) I first noticed something was amiss when "pkg -c /mnt ... " complained about /dev/null missing, IIRC ...

=C2=A0
getting /dev/null errors with p= kg -c makes sense. I wouldn't expect /dev to contain anything after a c= reate.

Why it is not populated on boot seems odd t= o me though... It's possible, if you created a deep boot environment, y= ou created a pool/ROOT/dev dataset
and it is overwriting the init= ial /dev from boot (I have not tested this theory). Tough to say without mo= re information about the BE layout, and maybe a look at fstab.

FWIW I typically run "pkg -r /tmp/be_mount.XXXX"= after mounting with "bectl mount" which should give you the same= effect as -c without the rooted devfs requirement

thx Wes and others for fe= edback, on or off list.
For now I'd like to kee= p the simplest setting in focus:

When I do:
# beadm create new_BE
# beadm activate new_BE
# reboot

I would expect new_BE t= o boot and also otherwise to all intents and purposes behave just like the = previous BE I just "left"; similarly, if I skip the 'activate= ' step and select new_BE from the FreeBSD boot menu.

thx
Michael
= --
recursion, n: see 'recursion'
<= /div> --000000000000d28da405de8e4748--