What makes a memstick image an "installer"?

My goal is to script the production of a USB memstick freebsd installer from an arbitrarily-chosen freebsd git source tree in a reproducible way.

I run poudriere regularly and I understand how to have poudriere set up a jail based on my selected freebsd source tree. It looks as if "poudriere image" could similarly produce a "live" usb memstick that I could use to boot a physical computer.

However, I don't understand what an "installer" memstick has that a "poudriere image" memstick doesn't.

My first guess would be: a base.txz, kernel.txz, and a /etc/rc.local copied from /usr/src/release/rc.local (which calls bsdinstall). Is there anything else?

thanks!
 
My first guess would be: a base.txz, kernel.txz, and a /etc/rc.local copied from /usr/src/release/rc.local (which calls bsdinstall). Is there anything else?
No, those distribution tarballs and rc.local is all that is needed.

Mind, distfiles are deprecated, pkgbase packages are used now. This would affect updating/upgrading the system in the future, when freebsd-update(8) is removed, unless the systems are updated/upgraded from source.

Not sure why you want to use poudriere-image(8). It would put extra layers of production steps to a memstick image, unless you are planing a custom installer (custom branding logos, 3rd party packages installed, etc.).

Here an example of a scripted (pkgbase) memstick image creation with system tools (except 3rd party git):
sh:
#!/bin/sh

git  clone  --branch  releng/15.1  https://git.FreeBSD.org/src.git  /usr/src-15.1

cd /usr/src-15.1
make -j `sysctl -n hw.ncpu`  buildworld  buildkernel

cd /usr/src-15.1/release
make memstick

cp /usr/obj/usr/src-15.1/amd64.amd64/release/memstick.img \
  /usr/local/ISO-IMAGES/FreeBSD-15.1-RELEASE-amd64-memstick.img
 
Two simple answers. Look at /etc/rc.conf and /etc/rc.local on the installer.
However, I don't understand what an "installer" memstick has that a "poudriere image" memstick doesn't.
Poudriere Image uses an overlay directory for local files so you control what it contains. You can copy the 2 installer files right into your Poudriere overlay.

We used to have a directory /usr/freebsd-dist/ on the memstick installer but it got axed for pkgbase starting with FreeBSD 15-RELEASE
 
Not sure why you want to use poudriere-image(8).
I believe that if I "make buildworld" on my local system, any adjustments in /etc/src.conf (and possibly other files) will affect the result. I'm trying to generate a clean install which, indeed, I might also customize, but in ways independent of the customizations targeted to the build host.

Poudriere would be convenient since I already have the setup and familiarity, but perhaps there is a more efficient way to achieve this goal other than doing it in a jail.
 
Back
Top