From 306735495dfb10ff910ee609d6a383a066f266a4 Mon Sep 17 00:00:00 2001 From: Tom Elliott Date: Tue, 27 Oct 2026 13:24:58 -0500 Subject: [PATCH] Describe FOG_KERNEL_RAMDISK_SIZE as the FOS /tmp size (schema 445) FOS now boots an initramfs on x64 and x86 (fos#199, ADR-0021), Latest from EXP_20261027-181357. The kernel ignores ramdisk_size= for an initramfs, so the old text, which said the value sizes the boot image, was wrong. FOS reads it as the size limit of /tmp, kept between 64 MB and half of RAM. The text says so, and keeps the old meaning for an init older than that release. Schema step 445 updates only settingDesc. The value is unchanged. Co-Authored-By: Claude Opus 5.5 --- packages/web/commons/schema.php | 18 ++++++++++++++++++ packages/web/src/Base/System.php | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/packages/web/commons/schema.php b/packages/web/commons/schema.php index 144cb1d085..a23bcdf695 100644 --- a/packages/web/commons/schema.php +++ b/packages/web/commons/schema.php @@ -12046,3 +12046,21 @@ function () { . "KEY `hptHostID` (`hptHostID`) " . ") ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci ROW_FORMAT=DYNAMIC", ]; + +// 445 +$this->schema[] = [ + // FOS now boots an initramfs on every arch (fos ADR-0021). The kernel + // ignores ramdisk_size= for an initramfs, so the old text, which said + // the value sizes the boot image, no longer describes what it does. + // FOS reads it instead as the size limit of its /tmp. An init older + // than EXP_20261027-181357 is an ext2 initrd and still uses the old + // meaning. + "UPDATE `globalSettings` SET `settingDesc` = 'The size, in KB, of the " + . "/tmp RAM disk on a client that boots FOS. FOS keeps it between 64 MB " + . "and half of the client''s physical memory. An init older than " + . "EXP_20261027-181357 instead uses this value as the size of its boot " + . "image, " + . "which must be larger than the init and smaller than the client''s " + . "physical memory. (Default 275000)' " + . "WHERE `settingKey` = 'FOG_KERNEL_RAMDISK_SIZE'", +]; diff --git a/packages/web/src/Base/System.php b/packages/web/src/Base/System.php index 8a6124a4b3..47143a7ab8 100644 --- a/packages/web/src/Base/System.php +++ b/packages/web/src/Base/System.php @@ -130,7 +130,7 @@ public function __construct() // 1.5.x carried count does, see SchemaReconciler's docstring -- is // permanently "up to date" from the updater's point of view and will // never run another indexed step, whatever this constant says. - define('FOG_SCHEMA', 444); + define('FOG_SCHEMA', 445); define('FOG_BCACHE_VER', 370); define('FOG_CLIENT_VERSION', '0.13.0'); // GH-959: iPXE lives in FOGProject/fog-ipxe and its binaries arrive as