From 321300b28909e9f50d53904a0f3f700375f9ac47 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Thu, 5 Dec 2013 17:23:27 +0100 Subject: [rfs-stage32] Fix zram swap creation for > 32 CPUs zram can only handle 32 devices, so the script broke with 40 cpu cores --- .../rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions | 1 + 1 file changed, 1 insertion(+) (limited to 'remote/rootfs/rootfs-stage32/data') diff --git a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions index a5c2ece7..362e8f14 100755 --- a/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions +++ b/remote/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-setup_partitions @@ -173,6 +173,7 @@ CPUS=$(grep -c -E "^processor.*[0-9]+$" /proc/cpuinfo) if [ -z "$CPUS" ]; then echo "ERROR: Could not determine CPU core count" else + [ "$CPUS" -gt "16" ] && CPUS=16 # zram can only handle up to 32 devices, the system can apparently even just handle 29 swap partitions, so use a reasonable upper limit if ! modprobe zram "num_devices=$CPUS"; then echo "ERROR: Could not load zram module" else -- cgit v1.2.3-55-g7522