From cfc0c8b6463b3ef2ba5a923ff601d5f56cbf414e Mon Sep 17 00:00:00 2001 From: Tobias Powalowski Date: Wed, 1 Jun 2022 19:00:29 +0200 Subject: [PATCH] new zram move for latest and local image --- usr/bin/archboot-update-installer.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/usr/bin/archboot-update-installer.sh b/usr/bin/archboot-update-installer.sh index 8e7ad751a..5b6cc719d 100755 --- a/usr/bin/archboot-update-installer.sh +++ b/usr/bin/archboot-update-installer.sh @@ -37,10 +37,19 @@ echo -e "\033[1mInformation:\033[0m Logging is done on \033[1m/dev/tty7\033[0m . _zram_initialize # Generate new environment and launch it with kexec if [[ "${_L_COMPLETE}" == "1" || "${_L_INSTALL_COMPLETE}" == "1" ]]; then + if ! [[ grep zram /proc/mounts ]]; then + modprobe zram + echo zstd > /sys/block/zram0/comp_algorithm > /dev/tty7 2>&1 + echo 3500M > /sys/block/zram0/disksize > /dev/tty7 2>&1 + mkfs.btrfs -q --mixed /dev/zram0 > /dev/tty7 2>&1 + mount /dev/zram0 /new_root + echo $0 $1 > /etc/profile.d/zz-01-archboot.sh + systemctl switch-root /new_root + fi _update_installer_check touch /.update-installer - _umount_w_dir - _zram_w_dir "${_ZRAM_SIZE}" + #_umount_w_dir + #_zram_w_dir "${_ZRAM_SIZE}" echo -e "\033[1mStep 1/9:\033[0m Waiting for gpg pacman keyring import to finish ..." _gpg_check echo -e "\033[1mStep 2/9:\033[0m Removing not necessary files from / ..."