[Bug 290235] bsdinstall: swap/dump partition too small to store kernel dump
Date: Tue, 14 Oct 2025 18:53:41 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=290235
Bug ID: 290235
Summary: bsdinstall: swap/dump partition too small to store
kernel dump
Product: Base System
Version: 16.0-CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: emaste@freebsd.org
bsdinstall sets dumpdev=AUTO if kernel core dumps are enabled, which uses the
first available swap device as a kernel dump device.
The default swap size has long been set via the algorithm in
usr.sbin/bsdinstall/partedit/part_wizard.c (and later applied to
usr.sbin/bsdinstall/scripts/zfsboot also):
static intmax_t
swap_size(intmax_t available)
{
intmax_t swapsize;
unsigned long maxswap;
size_t sz;
swapsize = MIN(available/20, 4*1024*1024*1024LL);
sz = sizeof(maxswap);
if (sysctlbyname("vm.swap_maxpages", &maxswap, &sz, NULL, 0) == 0)
swapsize = MIN(swapsize, (intmax_t)maxswap * getpagesize());
return (swapsize);
}
I.e., it is set to 1/20th of the amount of available memory, with a minimum
bound of 4GB and a maximum bound of the maximum amount of swap. The 4GB lower
bound will apply until the machine has at least 80GB of memory.
On my test laptop with 32GB of memory I often experience dump failure due to an
insufficient dump partition size.
--
You are receiving this mail because:
You are the assignee for the bug.