Solved Can you customize a poudriere jail?

Yes, you can! Poudriere does fixate created jails with a zfs snapshot like jailname@clean.
Destroy the snapshot, enter the jail, make your changes, and when done create a snapshot with the same name as the deleted. That's it!
 
Destroy the snapshot, enter the jail
It sounds good but can't start jail after deleting the clean snapshot.
Code:
# poudriere jail -s -j 143amd64 -p default
[00:00:00] Creating the reference jail...cannot open 'zroot/poudriere/jails/143amd64@clean': dataset does not exist
 done
pwd_mkdb: /poudriere/data/.m/143amd64-default/ref/etc/master.passwd: No such file or directory
[00:00:00] Error: pwd_mkdb for the jail failed.
 
Erm.. it seems i won't be able to handle such thing now and gonna sleep instead. Maybe not later too, i might continue doing the footwork myself.

Code:
# vipw
vipw: no changes made
# vipw
vipw: password list updated
# pkg ins portlint portfmt distilator
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly, please wait...
pkg: Attempted to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly/Latest/pkg.pkg
pkg: Attempted to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly/Latest/pkg.txz
pkg: Error: Host does not resolve
Address resolution failed for https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly.
Bootstrapping pkg from pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3, please wait...
pkg: Attempted to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3/Latest/pkg.pkg
pkg: Attempted to fetch pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3/Latest/pkg.txz
pkg: Error: Host does not resolve
Address resolution failed for https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3.

Code:
# date
Fri Nov 28 00:32:40 +03 2025
 
OK, I've done it in the morning.

I got some help by using nullfs mounts to the chroot while setting up the jail.

However, my default shell is getting replaced by /bin/sh somehow.

Thanks.
 
However, my default shell is getting replaced by /bin/sh somehow.
I think there is an environment variable called INTERACTIVE_SHELL that can be written to /usr/local/etc/poudriere.conf.

/usr/local/share/poudriere/common.sh:
Code:
        It is recommended to set these in the environment:
        EOF
        case "${INTERACTIVE_SHELL}" in
        csh)
                cat >> "${MASTERMNT:?}/etc/motd" <<-EOF
                        setenv DEVELOPER 1
                        setenv DEVELOPER_MODE yes
                EOF
                ;;
        *sh)
                cat >> "${MASTERMNT:?}/etc/motd" <<-EOF
                        export DEVELOPER=1
                        export DEVELOPER_MODE=yes
                EOF
                ;;
        esac

I put INTERACTIVE_SHELL="csh" to /usr/local/etc/poudriere.conf and I get csh as default shell now. tcsh does work too.
 
Back
Top