Re: FreeBSD, boot environments and /dev

From: Michael Schuster <michaelsprivate_at_gmail.com>
Date: Wed, 18 May 2022 12:45:18 UTC
On Sat, May 14, 2022, 21:40 Michael Schuster <michaelsprivate@gmail.com> wrote:
>
> On Thu, May 12, 2022 at 9:21 AM Dave Cottlehuber <dch@skunkwerks.at> wrote:
> >
> > On Thu, 12 May 2022, at 07:12, Michael Schuster wrote:
> > > On Wed, May 11, 2022 at 11:38 PM Dave Cottlehuber <dch@skunkwerks.at> wrote:
> > >> On Wed, 11 May 2022, at 14:58, Michael Schuster wrote:
> > >> > I then created a new BE, mounted it on /mnt, removed /mnt/dev/* (only
> > >> > regular files and empty directories). Booting into that BE didn't work
> > >> > either, I got errors about missing "/dev/" files (can't recall the
> > >> > exact names).
> > >> >
> > >> > What do you guys (plural ;-)) think?
> > >
> > > Hi Dave,
> > > thx for your perseverance :-)
> > >
> > > I have (at least) one question for you before I attempt this:
> > > where do I get these .txz files?
> >
> > https://download.freebsd.org/ftp/snapshots/amd64/amd64/14.0-CURRENT/
> > https://download.freebsd.org/ftp/releases/amd64/amd64/13.1-RC6/
> >
> > > should devfs be in /etc/fstab? in my current BE, it isn't ...
> >
> > this is the bare minimum I used. NB my partitions have artisanal
> > GPT labels, yours will probably be different.
> >
> > # Device                Mountpoint              FStype          Options                         Dump    Pass#
> > #/dev/gpt/swap0         none                    swap            sw                              0       0
> > /dev/gpt/efiboot        /boot/efi               msdosfs         rw,late,longnames               0       0
> > tmpfs                   /tmp                    tmpfs           rw,mode=01777,size=120g         0       0
> >
> > thats all I needed to boot to userland & login. I'm reasonably sure that,
> > assuming you have a default zfs install, you'd not need anything in /etc/fstab
> > to boot.
> >
> > > if so: do you have an example of such a line? In the instances I looked
> > > up, I wasn't quite able to make it work (but perhaps that's a dead end
> > > anyway).
> > >
> > >> # bectl activate -t vanilla
> > >
> > > does that ("activate -t") work on UEFI systems? The last time I used it
> > > (at least a year ago), it wasn't.
> >
> > Yes it does here. failing that just use `bectl activate`. The -t is
> > a very nice addition.
> >
> > Well, we're definitely on the FreeBSD-current email list here, so it's
> > definitely in CURRENT, and 13.1 RC.
>
> Dave, all:
>
> findings:
> 1) temporary activation doesn't work for me: bectl accepts the option
> but there's no effect I noticed(*), beadm refuses the option.


update (answered in a different thread, but to keep this here too):
temporary activation does in fact work, it's not reflected in the list
of BEs presented at the boot menu

I'm still working on a "full" installation of what I have on the
running BE into the new one ("vanilla") - if you have any ideas, I
welcome them :-)

thx
Michael
>
> 2) booting into 'vanilla' worked - I got into a root shell on the console.
>
> Since I copied the files you mention (/etc/fstab /etc/rc.conf
> /boot/loader.conf) unchanged, that looks good.
>
> so ... this is probably a good starting point (again ;-)).
>
> I rebooted into the last "good" BE, mounted vanilla a clone of vanilla
> on /mnt (with vanilla a point to start again if anything goes wrong)
> and started with "pkg -r /mnt install pkg" ...
>
> but I admit it's getting late today, so I'll be lazy and ask if you
> have any further recommendations - I've come to expect them to work
> nicely :-) (and yes, I am grateful!)
>
> *) unless the first BE to be shown when I select 'boot environments'
> at boot isn't in fact the active one
>