Proper way to use -STABLE

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 12,744
Messages: 39,332

This information is missing in the handbook.
Poudriere uses jail(8), a lot. Each build job is set up from a clean jail. This 'limitation' is because a jail runs on the host's kernel. The host kernel can only support up to version X, running a X+1 userland will cause problems. There's backwards compatibility, not forward.

To run 12, 11 or other, previous version jails (or executables in general) you need to have a kernel with the COMPAT_FREEBSD12, COMPAT_FREEBSD11, etc. Just in case you decide to build a custom kernel and remove all those. The GENERIC kernel has them enabled by default.
 

grahamperrin

Son of Beastie

Reaction score: 830
Messages: 2,681


FreeBSD bug 259090 – UFS: bad file descriptor: soft update journaling can not be enabled on FreeBSD-provided disk images for 13.0-RELEASE and 13.0-STABLE – failed to write updated cg

… I think I should look into boot environments... better now than later …

True, and I suggest habitually booting a new environment before any upgrade (or installation that will affect an already installed package).

Here (-CURRENT):
Code:
% bectl list -c creation
BE                    Active Mountpoint Space Created
n250511-5f73b3338ee-d -      -          4.36G 2021-11-13 15:43
n250650-ef396441ceb-c -      -          1.13G 2021-11-28 03:02
n251146-d109559ddbf-a -      -          86.7M 2021-11-29 22:14
n251146-d109559ddbf-b NR     /          76.0G 2021-12-02 02:11
%

n251146-d109559ddbf-a and n251146-d109559ddbf-b are the same base OS. First -a, then I created and booted -b before the first pkg upgrade.

Code:
…
sudo make buildworld KERNCONF=MYKERNEL
sudo make buildkernel KERNCONF=MYKERNEL
sudo make installworld KERNCONF=MYKERNEL
sudo make installkernel KERNCONF=MYKERNEL

Does this make sense?

If you'll take something like that approach, then you must (at least) correct the order.

<https://forums.freebsd.org/posts/544209> ▶ <https://cgit.freebsd.org/src/tree/UPDATING?id=e641c29a006ae9f528f196386052355b42a53d75#n2455> where installation of the kernel precedes installation of world.

I assume that KERNCONF has no effect on world.

… I've added KERNCONF="MOLLY GENERIC" to /etc/make.conf, that way you don't have to supply it every time. During the buildkernel stage all kernels in KERNCONF will be built. In the installkernel phase only the first on the list will be installed. …

Thanks, so KERNCONF can never affect buildkernel (do I understand correctly)?

… a 13.0-STABLE physical host is currently not an option for me. …

Please, why not? (Have I misunderstood something on page 1?)

… easier initial setup …

All things considered, I reckon <https://www.freebsd.org/where/#_freebsd_13_0_stable> use an installer for (not an image of) 13.0-STABLE; and install to ZFS.
 
Last edited:

grahamperrin

Son of Beastie

Reaction score: 830
Messages: 2,681

Thanks, and apologies. Speed reading, I mis-read this:

𡀦… During the buildkernel stage all kernels in KERNCONF will be built. …

(I saw "all kernels" but overlooked the context.)



For when I next update 14.0-CURRENT from source:

Code:
% head -n 2 /etc/src.conf
# <https://forums.freebsd.org/posts/544812>
KERNCONF="GENERIC-NODEBUG GENERIC"
%

In the CURRENT context, is GENERIC debug-enabled?

No mention of debug at or around <https://docs.freebsd.org/en/books/handbook/cutting-edge/#makeworld>.

(For performance, I normally boot GENERIC-NODEBUG, but it'll be smart to have a debug-enabled kernel handy, when required.)
 
Top