freebsd:jails
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| freebsd:jails [2020/10/01 00:49] – sleepy | freebsd:jails [2025/07/07 23:10] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 44: | Line 44: | ||
| ====== Configure zfs jail base ====== | ====== Configure zfs jail base ====== | ||
| <code bash> | <code bash> | ||
| - | touch / | + | touch / |
| + | mkdir -p / | ||
| + | cp / | ||
| cp / | cp / | ||
| cp / | cp / | ||
| - | touch / | ||
| echo ' | echo ' | ||
| echo ' | echo ' | ||
| Line 63: | Line 64: | ||
| ==== install typical packages, add user, install dotfiles, copy keys.==== | ==== install typical packages, add user, install dotfiles, copy keys.==== | ||
| <cli green uppercase> | <cli green uppercase> | ||
| - | mkdir -p / | + | pkg -j BASE install nano zsh git-lite python37 py37-pip |
| - | cp / | + | |
| - | jexec -l BASE pkg install nano zsh git-lite python37 py37-pip | + | |
| jexec -l BASE adduser | jexec -l BASE adduser | ||
| jexec -l -U sleepy BASE git clone https:// | jexec -l -U sleepy BASE git clone https:// | ||
| Line 90: | Line 89: | ||
| }</ | }</ | ||
| * add entry to **/ | * add entry to **/ | ||
| - | |||
| ---- | ---- | ||
| + | ====== Updating jails ====== | ||
| + | ===== using source ===== | ||
| + | assuming you have already built and installed world and kernel. Stop the running jail(s) first. | ||
| + | < | ||
| + | make installworld DESTDIR=/ | ||
| + | mergemaster -iFU -D /jails/path | ||
| + | </ | ||
| + | ==== jails_update.sh ==== | ||
| + | Script to automate the updates, just make sure to update the jails paths. | ||
| + | <code bash jails_update.sh> | ||
| + | jails="/ | ||
| + | cd /usr/src | ||
| + | |||
| + | for jail in $jails | ||
| + | do | ||
| + | make installworld DESTDIR=$jail | ||
| + | mergemaster -iFU -D $jail | ||
| + | done | ||
| + | </ | ||
| + | |||
| + | ===== using freebsd-update binaries ===== | ||
| + | <code bash> | ||
| + | freebsd-update -b /jails/path fetch | ||
| + | freebsd-update -b /jails/path install | ||
| + | </ | ||
| + | ---- | ||
| ====== To Do ====== | ====== To Do ====== | ||
| - | * create ZFS dataset with 20% reserve quota | + | * create ZFS dataset with 20% reserve quota <code bash>zfs create -o quota=300G -o mountpoint=/ |
| - | * **zfs create -o quota=300G -o mountpoint=/ | + | |
| + | echo $jail</ | ||
| + | | ||
| + | * need to create alias for jail ip on hosts network interface during jail creation. | ||
| + | * using '' | ||
| + | * permanent using '' | ||
freebsd/jails.1601513347.txt.gz · Last modified: (external edit)
