From nobody Wed Jul 30 18:39:12 2025 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4bsgwd0rV1z62tX0; Wed, 30 Jul 2025 18:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bsgwd00YTz3DQM; Wed, 30 Jul 2025 18:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753900753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfTgaIrdmMTb6Zem789cQtE9zBezRA32ZF8Q4rLveTE=; b=YCuYLwLAYFioPEnx7AVxLdbOLcePLpHMeRk8OPtIX/uVL30V6jxE/BJRnJVInXuFN/XOSA stZKzezmWXf8HIrYsRjwRMj2elDwKG4ImHTpcq4V6m++Ug+/E38fjjuIcBhOJTuaJIpZKF PnnDzm0+Y131erkXAKV8aHyUbwA0lD0HwfnB3F97la2MSLmuh7R8Zkos6Ls3nAD3WqVk6V TksF8DIihyZlZXByrD/bLDFzZbsSpItrLDykYOYJngl6eUTmppmc5yswKEyFWulH0Fp2In uNs/veFmK1FMjoHyo1QyGFJPSCmx+QdUSA06m0MADuL1X+JZTembVJbmweaPog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753900753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfTgaIrdmMTb6Zem789cQtE9zBezRA32ZF8Q4rLveTE=; b=vkGfacGTF5wP0Aadhm9gLj2nY2KYxg0wvXgsxpiyVuvYJ/kldc+5RtrPqWDvTR1+32qJOC 5sWpzKmj+Is3/3hA2DkG9j2aLXUykVXe0vcpi+BhUmP+9iPfR0jcLxqpL8FnHxj6ovKznV 6IRLCeX/vUf8w6EHiADHRIQGqmKywwuJBPEvhfnlXUn3ffD1LL1X8I2yaA0V0CbL93IPrB tw2fJIFyfQP1sAQlFaUkhwHcHPYqM495PGncXOTY4zdVpO15d24RZVdF5aNbHEupwQqyTd BVQVqAkuziHmaBQW/bCAm9/6yqM2D9ccufqi57AxfN/VzEXZ5lj7y/ltI12WOA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753900753; a=rsa-sha256; cv=none; b=b9cpXSvDfXmAsAtXHTf0NKhqf2tOpLpWmoXnlff/7NITaOS3QT38wQQZ7qZuHGL3KjzpOd iU+PCi/FZjy4XH2JGFl6UdiIvSbYWWc/KY14/ZrlE5rU1XiDGwJoaSDd/o92kJ60FySflZ cqy60KUl6jmP+Xt+YEi7nv2msZZjDP6uePfe8jAyqD1EagnviWccGmgq27mlCph1mEoeh0 0aVt+l1zMFcW1QK38/Lo8UfDFqVfYg0u1y5l0Cr+K+6KH1xfr5yOxIgr5mSK8gjuGUYkS2 RBXMTMGrMDSSFUcwu2TQHchRbsrP27RYWcFkfIXoRwW73Yhg9KtgSrtsVVRWRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bsgwc6VrczCXp; Wed, 30 Jul 2025 18:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56UIdCGP004355; Wed, 30 Jul 2025 18:39:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56UIdChV004352; Wed, 30 Jul 2025 18:39:12 GMT (envelope-from git) Date: Wed, 30 Jul 2025 18:39:12 GMT Message-Id: <202507301839.56UIdChV004352@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Ed Maste Subject: git: 525795cde28b - stable/14 - bsdinstall: Emit a warning if the system has too little memory List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 525795cde28bbbc0aba3e5f359dfc877b9f248d1 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=525795cde28bbbc0aba3e5f359dfc877b9f248d1 commit 525795cde28bbbc0aba3e5f359dfc877b9f248d1 Author: Ed Maste AuthorDate: 2025-06-19 19:48:14 +0000 Commit: Ed Maste CommitDate: 2025-07-30 18:06:38 +0000 bsdinstall: Emit a warning if the system has too little memory PR: 251993 Reviewed by: adrian Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50944 (cherry picked from commit eb5884c564ae0e37df1d8a3fc5704ab6b2fa07d0) --- usr.sbin/bsdinstall/scripts/auto | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index ab0191feea17..5375b73e57d4 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -178,6 +178,14 @@ environment_save rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC +# With pkgbase, pkg OOM has been observed with QEMU-default 128 MiB memory size. +# Ensure we have at least about 256 MiB (with an allowance for rounding etc.). +physmem=$(($(sysctl -n hw.physmem) / 1048576)) +if [ $physmem -lt 200 ]; then + bsddialog --backtitle "$OSNAME Installer" --title "Warning" \ + --msgbox "Insufficient physical memory (${physmem} MiB) detected. At least 256 MiB is recommended. The installer or installed system may not function correctly." 0 0 +fi + [ -f /usr/libexec/bsdinstall/local.pre-everything ] && f_dprintf "Running local.pre-everything" && sh /usr/libexec/bsdinstall/local.pre-everything "$BSDINSTALL_CHROOT" trap true SIGINT # This section is optional