etcupdate -p vs. root on zfs (and bectl use and such): no /usr/src/etc/master.passwd (for example)

From: Mark Millard <marklmi_at_yahoo.com>
Date: Fri, 23 Apr 2021 00:39:12 -0700
FYI: The default bsdinstall result for auto ZFS that I tried
has a separate zroot/usr/src dataset, which zfs mounts at
/usr/src .

UPDATING and such places indicate sequences like:
(think etcupdate where it lists mergemaster and ignore
-F and -Fi)

	<make sure you have good level 0 dumps>
	make buildworld
	make buildkernel KERNCONF=YOUR_KERNEL_HERE
	make installkernel KERNCONF=YOUR_KERNEL_HERE
							[1]
	<reboot in single user>				[3]
	mergemaster -Fp					[5]
NOTE: What /usr/src/etc/master.passwd here? (for example)
	make installworld
	mergemaster -Fi					[4]
	make delete-old					[6]
	<reboot>

etcupdate has the logic for handling -p:

        if [ -n "$preworld" ]; then
                # Build a limited tree that only contains files that are
                # crucial to installworld.
                for file in $PREWORLD_FILES; do
                        name=$(basename $file)
                        mkdir -p $1/etc >&3 2>&1 || return 1
                        cp -p $SRCDIR/$file $1/etc/$name || return 1
                done

Note the "$SRCDIR/$file". But for a boot -s after
installing the kernel there is only zroot/ROOT/NAME
and no zroot/usr/src zfs mount so /usr/src/ is empty.

This leads to needing an additional step:

zfs mount zroot/usr/src

(The instructions do not deal with making / writable at this
stage either.)



===
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)
Received on Fri Apr 23 2021 - 05:39:23 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:41:28 UTC