From 5990ca5df2ff5b4cd4c2c408ec8606efaff73103 Mon Sep 17 00:00:00 2001 From: ading2210 Date: Tue, 7 Nov 2023 20:38:52 +0000 Subject: [PATCH] enable zram in the debian rootfs --- rootfs/etc/modules-load.d/zram.conf | 2 ++ rootfs/opt/setup_rootfs.sh | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 rootfs/etc/modules-load.d/zram.conf diff --git a/rootfs/etc/modules-load.d/zram.conf b/rootfs/etc/modules-load.d/zram.conf new file mode 100644 index 0000000..558a89a --- /dev/null +++ b/rootfs/etc/modules-load.d/zram.conf @@ -0,0 +1,2 @@ +zram +lzo \ No newline at end of file diff --git a/rootfs/opt/setup_rootfs.sh b/rootfs/opt/setup_rootfs.sh index dd4e36a..fee86d0 100755 --- a/rootfs/opt/setup_rootfs.sh +++ b/rootfs/opt/setup_rootfs.sh @@ -29,7 +29,13 @@ apt-get upgrade -y systemctl enable kill-frecon.service #install desktop -apt-get install -y task-xfce-desktop cloud-utils +apt-get install -y task-xfce-desktop cloud-utils zram-tools + +#set up zram +tee -a /etc/default/zramswap << END +ALGO=lzo +PERCENT=50 +END #set up hostname and username read -p "Enter the hostname for the system: " hostname