Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I have just automated novaspirits zram #9

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 5 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
# rpi_zram
Script to dynamically enable ZRAM on a Raspberry Pi or other Linux system.

Automatically detects the number of CPU cores to allocate to ZRAM computation, disables existing swap and enables ZRAM swap.
Ok all you need to do is copy and paste these commands in terminal just minus the #

Download the script and copy to /usr/bin/ folder
> sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh
#sudo wget -O //home/pi/zram_auto https://raw.githubusercontent.com/dcpender/rpi_zram/master/zram_auto

make file executable
> sudo chmod +x /usr/bin/zram.sh
#chmod u+x zram_auto

edit /etc/rc.local file to run script on boot
> sudo nano /etc/rc.local
#./zram_auto

add line before exit 0
> /usr/bin/zram.sh &
This is just My automated Version of @Novaspirit zram
Empty file modified zram.sh
100755 → 100644
Empty file.
13 changes: 13 additions & 0 deletions zram_auto
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

#ZRAM Config
sudo wget -O /usr/bin/zram.sh https://raw.githubusercontent.com/novaspirit/rpi_zram/master/zram.sh

#Make ZRAM Executable
sudo chmod +x /usr/bin/zram.sh

#edit /etc/rc.local file to run script on boot
sudo sed -i '/exit 0/c\/usr/bin/zram.sh &\nexit 0' /etc/rc.local

#Reboot
reboot