Fail to install base packages. Memory exhausting.
Recently I tried to install FreeBSD on baremetal.
I've got recent 14.3 LiveUSB stick with own basepackages (builded from 14-STABLE via make packages).
On bare-metal server I booted from LiveUSB then go to live system. Then I prepared server's disk, mount it
and run something like
pkg -r /mnt -o IGNORE_OSVERSION=yes add /media/basepkgs/FreeBSD:14:amd64/14.snap20250717082520/FreeBSD-at-14.snap20250717082520.pkg
Then I have long time of running strings:
Examining this process shows that pkg eat all memory and after all memory exhausted killed by system.
I was doing such a things on virtual machine with pkg 1.21 and that was fine.
pkg version 2.0.5 is unaffected.
why are you using pkg add instead of pkg install ?
Because I use packages stored in a local media.
- https://github.com/freebsd/pkg/issues/2478#issue-3242339655
LiveUSB stick
Try:
sysctl vm.pageout_oom_seq=120
. . .
Try:
sysctl vm.pageout_oom_seq=120
An earlier screen shot shows evidence of an unbound recursion. vm.pageout_oom_seq will do no good in such cases.
Because I use packages stored in a local media.
Normal repositories can be on local media and handled in normal upgrade and install ways. For example I use:
# cat /usr/local/etc/pkg/repos/main-ZNV4-default.conf
main-ZNV4-default: {
url: "file:///usr/local/poudriere/data/packages/main-ZNV4-default",
enabled: yes,
}
I use commands like:
# pkg upgrade -rmain-ZNV4-default
# pkg install -rmain-ZNV4-default `cat ~/origins/amd64-pkgs.txt`
My command was:
pkg -r /mnt -o IGNORE_OSVERSION=yes add /media/basepkgs/FreeBSD:14:amd64/14.snap20250717082520/FreeBSD-at-14.snap20250717082520.pkg
It failed same way with any base package I try. So no "FreeBSD-at" specific. Pkg 2.05 do things well invoked by the same command.