Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#16
From a Terminal run:

Code: Select all

/usr/local/sbin/zramstart
& see what errors it gives.

I think the problem is probably line 14 of the script above:

Code: Select all

modprobe -q zram zram_num_devices=$num_cpus
For the Liquorix 3.4 kernel the module parameter has reverted back to num_devices (not zram_num_devices)

If running the above script gives you a module error complaining of an"unknown symbol" you just need to amend line 14

To check if this is the case just run the following in a Terminal:

Code: Select all

num_cpus=$(grep -c processor /proc/cpuinfo)
modprobe zram num_devices=$num_cpus
& if this runs without errors change line 14 & reboot &

Code: Select all

lsmod | grep zram
to confirm the module is loaded
Posts: 765
rust collector
Joined: 27 Dec 2011
#17

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart
/usr/local/sbin/zramstart: 8: /usr/local/sbin/zramstart: source: not found
/usr/local/sbin/zramstart: 17: /usr/local/sbin/zramstart: cannot create /sys/block/zram0/disksize: Directory nonexistent
/dev/zram0: No such file or directory
swapon: /dev/zram0: stat failed: No such file or directory
/usr/local/sbin/zramstart: 17: /usr/local/sbin/zramstart: cannot create /sys/block/zram1/disksize: Directory nonexistent
/dev/zram1: No such file or directory
swapon: /dev/zram1: stat failed: No such file or directory
But if I type in /usr/local/sbin/zramstart, the file pops up!

Code: Select all

num_cpus=$(grep -c processor /proc/cpuinfo)
modprobe zram num_devices=$num_cpus
I get:

Code: Select all

root@antiberg:/home/kberg
# modprobe zram num_devices=$num_cpus
ERROR: could not insert 'zram': Unknown symbol in module, or unknown parameter (see dmesg)
Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#18
You are missing the /etc/default/zram file

Download & unzip the
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"https://github.com/mystilleef/FedoraZram/zipball/master"
linktext was:"source"
====================================


In the source directory run:

Code: Select all

sudo make install
sudo systemctl daemon-reload
systemctl enable zram.service
systemctl start zram.service
Depending on your kernel you may also still need to amend line 14 of /usr/local/sbin/zramstart

On my system the zram modules are located at:

Code: Select all

┌──[root@toshiba-laptop]──[~] 13:42:18 
└── locate zram | grep modules
/lib/modules/3.4.0-2.dmz.2-liquorix-686/kernel/drivers/staging/zram
/lib/modules/3.4.0-2.dmz.2-liquorix-686/kernel/drivers/staging/zram/zram.ko
/lib/modules/3.4.0-3.dmz.1-liquorix-686/kernel/drivers/staging/zram
/lib/modules/3.4.0-3.dmz.1-liquorix-686/kernel/drivers/staging/zram/zram.ko
If the above command shows no zram modules you will need to run the
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.liquorix.net/"
linktext was:"Liquorix kernel"
====================================
. If you do not have the locate command:

Code: Select all

apt-get install mlocate
updatedb
Posts: 765
rust collector
Joined: 27 Dec 2011
#19
Well, I can open the /etc/default/zram file in leafpad... so...it should be there???

Lets see...

Code: Select all

root@antiberg:/home/kberg
# locate zram | grep modules
/lib/modules/3.4.1-antix.1-486-smp/kernel/drivers/staging/zram
/lib/modules/3.4.1-antix.1-486-smp/kernel/drivers/staging/zram/zram.ko
/lib/modules/3.4.2-antix.2-486-smp/kernel/drivers/staging/zram
/lib/modules/3.4.2-antix.2-486-smp/kernel/drivers/staging/zram/zram.ko
I am going back and will try to the install again, I think...

And many thanks for your help/time!
Posts: 765
rust collector
Joined: 27 Dec 2011
#20
So, I started again, following the instructions... and... I get the same error...

Oh well... maybe later!
I have a birthday party I have to be at.
Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#21
Comment out line 8 in /usr/local/sbin/zramstart & re-run it from the terminal.

If you still see the modprobe error change the module parameter on line 14 of /usr/local/sbin/zramstart:

FROM:

Code: Select all

modprobe -q zram zram_num_devices=$num_cpus
TO:

Code: Select all

modprobe -q zram num_devices=$num_cpus
Posts: 765
rust collector
Joined: 27 Dec 2011
#22
Ok, when I commented out line 8, I get:

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart 
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram0/disksize: Directory nonexistent
/dev/zram0: No such file or directory
swapon: /dev/zram0: stat failed: No such file or directory
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram1/disksize: Directory nonexistent
/dev/zram1: No such file or directory
swapon: /dev/zram1: stat failed: No such file or directory
When I comment out line 8, and change 14, I get:

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart 
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram0/disksize: Directory nonexistent
/dev/zram0: No such file or directory
swapon: /dev/zram0: stat failed: No such file or directory
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram1/disksize: Directory nonexistent
/dev/zram1: No such file or directory
swapon: /dev/zram1: stat failed: No such file or directory
When I don't comment out line 8, but change 14, I get:

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart 
/usr/local/sbin/zramstart: 8: /usr/local/sbin/zramstart: source: not found
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram0/disksize: Directory nonexistent
/dev/zram0: No such file or directory
swapon: /dev/zram0: stat failed: No such file or directory
/usr/local/sbin/zramstart: 18: /usr/local/sbin/zramstart: cannot create /sys/block/zram1/disksize: Directory nonexistent
/dev/zram1: No such file or directory
swapon: /dev/zram1: stat failed: No such file or directory
!!!!!ARRRRR!!!!! oh well...
Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#23
There can only be something going wrong with the modprobe. Run the following manually in the terminal:

Code: Select all

num_cpus=$(grep -c processor /proc/cpuinfo)
modprobe zram zram_num_devices=$num_cpus
if the 2nd command fails then try:

Code: Select all

modprobe zram num_devices=$num_cpus
This will tell you what the correct module parameter needs to be (either zram_num_devices or num_devices) in /usr/local/sbin/zramstart line 14 (note in the above modprobe"-q" is removed so you see the output in the terminal)

Adjust line 14 according to whichever modprobe works without error & comment out line 8
Posts: 765
rust collector
Joined: 27 Dec 2011
#24

Code: Select all

root@antiberg:/home/kberg
# num_cpus=$(grep -c processor /proc/cpuinfo)
root@antiberg:/home/kberg
# modprobe zram zram_num_devices=$num_cpus
ERROR: could not insert 'zram': Unknown symbol in module, or unknown parameter (see dmesg)
root@antiberg:/home/kberg
# modprobe zram num_devices=$num_cpus
ERROR: could not insert 'zram': Unknown symbol in module, or unknown parameter (see dmesg)
root@antiberg:/home/kberg
Heh, Is your hair falling out yet?
Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#25
It's starting to __{{emoticon}}__

All I can suggest is trying the
========= SCRAPER REMOVED AN EMBEDDED LINK HERE ===========
url was:"http://www.liquorix.net/"
linktext was:"Liquorix kernel"
====================================
- I know the zram modules load correctly with this.
Posts: 765
rust collector
Joined: 27 Dec 2011
#26
Ok, I will try one of those... give me a few minutes...
Posts: 765
rust collector
Joined: 27 Dec 2011
#27
on a liquorix 3.4.0-3.dmz.1-liquorix-686 kernel now...

Code: Select all

root@antiberg:/home/kberg
# locate zram | grep modules
/lib/modules/3.4.1-antix.1-486-smp/kernel/drivers/staging/zram
/lib/modules/3.4.1-antix.1-486-smp/kernel/drivers/staging/zram/zram.ko
/lib/modules/3.4.2-antix.2-486-smp/kernel/drivers/staging/zram
/lib/modules/3.4.2-antix.2-486-smp/kernel/drivers/staging/zram/zram.ko
Isn't that a bit odd?

Anyway, when I do:

Code: Select all

# modprobe zram num_devices=$num_cpus
It does nothing, so I assume there are no errors?


Ok, soooo.....

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart 
Setting up swapspace version 1, size = 693084 KiB
no label, UUID=df4fdb20-d583-4dde-a9a8-fe43f5eda56f
Setting up swapspace version 1, size = 693084 KiB
no label, UUID=3e263e8a-8332-46b3-b2b2-96156de3b2d3
YAY!! I think? looks right to me?
Posts: 75
tradetaxfree
Joined: 18 Jan 2012
#28
Yes that means it works - you can also verify the modules are loaded after booting with:

Code: Select all

lsmod | grep zram
Posts: 765
rust collector
Joined: 27 Dec 2011
#29
aha!

Code: Select all

root@antiberg:/home/kberg
# lsmod | grep zram
zram                    8658  2 
so the modules are loaded... but...

Code: Select all

root@antiberg:/home/kberg
# /usr/local/sbin/zramstart 
/dev/zram0: Device or resource busy
swapon: /dev/zram0: swapon failed: Device or resource busy
/dev/zram1: Device or resource busy
swapon: /dev/zram1: swapon failed: Device or resource busy
Does that mean it is running(busy)? or is it messed up again?
anticapitalista
Posts: 5,955
Site Admin
Joined: 11 Sep 2007
#30
/usr/local/sbin/ doesn't exist on antiX.

zram is in /usr/local/bin.

But it says:

Code: Select all

# Short-Description: Increased Performance In Linux With zRam (Virtual Swap Compressed in RAM)
# Description: Adapted from systemd scripts at https://github.com/mystilleef/FedoraZram
# Included as part of antix-goodies package by anticapitalista <antiX@operamail.com>
# This script was written by tradetaxfree and is found at http://crunchbanglinux.org/forums/topic/15344/zram-a-good-idea/
# Copy this script (as root) from /usr/local/bin to /etc/init.d and then #update-rc.d zram defaults
# After booting verify the module is loaded with: lsmod | grep zram
### END INIT INFO
Have you done that?