Author Topic: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?  (Read 163337 times)

0 Members and 1 Guest are viewing this topic.

Fuerteventura

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #15 on: April 02, 2010, 08:25:42 PM »
Starting with the 400.vps, version 100328-1, one of it's internal block reached the inner limit 33554432 bytes. It's a kernel variable which
is (quite artificially) limiting the maximum size of any SHM memory block - and 33554432 was a default for some kernels.

Solution? Set the limit to higher values (as root):

sysctl -w kernel.shmmax=128000000
OR
echo 128000000 >/proc/sys/kernel/shmmax

Place those lines to /etc/init.d/rcS or equivalent file (it's distribution-specific a bit - see /etc/inittab, the sysinit runlevel) to have them set automatically (just after boot).

regards,
pc

Hello Zilog,

I did what you posted and it works!!.

Thanks a lot and contratulations for Avast! Free for Linux.

Regards from Fuerteventura.

Pedro


Step by step for a newbie like me:

1.- Open terminal
2.- Type: "sudo su" (then introduce your password)
3.- Type: "echo 128000000 >/proc/sys/kernel/shmmax" (this will solve the problem in the current session).
4.- Type: "gedit /etc/init.d/rcS"
5.- Include the line mentioned by Zilog inside, like follows:
  #! /bin/sh
    #
    # rcS
    #
    # Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
    #

    sysctl -w kernel.shmmax=128000000

    exec /etc/init.d/rc S


6.- Save the file and that's all.


(ES)Solución paso a paso para que funcione Avast para los novatos como yo:

1.- Abrir un terminal.
2.- Teclear: "sudo su" (introduce tu clave)
3.- Teclear: "echo 128000000 >/proc/sys/kernel/shmmax" (con esto debería funcionar durante la sesión que hay en curso.).
4.- Teclear: "gedit /etc/init.d/rcS"
5.- Incluir la línea que indica Zilog, como se puede ver a continuación:
  #! /bin/sh
    #
    # rcS
    #
    # Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
    #

    sysctl -w kernel.shmmax=128000000

    exec /etc/init.d/rc S


6.- Guardar el fichero y ya está ok!.

Offline Lisandro

  • Avast team
  • Certainly Bot
  • *
  • Posts: 67195
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #16 on: April 02, 2010, 10:55:53 PM »
Why do I have to something to make this product work with Ubuntu 9.10?  This is most annoying!  I didn't break the product but, in order to continue to use it, I now have the responsibility to fix it?
The size of the virus definitions database reached a system limit.
This happened with Windows 98 and was corrected by the program itself.
It could be done by them, but like posted before, it will be an application changing a system setting.
The best things in life are free.

Offline chudtrooper

  • Newbie
  • *
  • Posts: 2
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #17 on: April 04, 2010, 10:59:40 PM »
Starting with the 400.vps, version 100328-1, one of it's internal block reached the inner limit 33554432 bytes. It's a kernel variable which
is (quite artificially) limiting the maximum size of any SHM memory block - and 33554432 was a default for some kernels.

Solution? Set the limit to higher values (as root):

sysctl -w kernel.shmmax=128000000
OR
echo 128000000 >/proc/sys/kernel/shmmax

Place those lines to /etc/init.d/rcS or equivalent file (it's distribution-specific a bit - see /etc/inittab, the sysinit runlevel) to have them set automatically (just after boot).

Thanks Zilog!  This worked for me just fine, I'm running Ubuntu 9.04 and I just typed the "sysctl -w kernel.shmmax=128000000" as root and the problem is fixed.  Thanx again!

regards,
pc

pcelf

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #18 on: April 08, 2010, 01:00:50 AM »
Quote from: YukonGuy on April 02, 2010, 04:23:23 PM
This solution is fine for those of us who are used to "playing around under the hood".  Fix the product not the user.

You gotta remember that Linux isn't made by any one entity. It has it's limits and as time goes on the limits will be dealt with. Also Linux isn't really for the faint of heart. If you're not willing to tinker with it a little you should be thinking about another OS.
« Last Edit: April 08, 2010, 01:03:45 AM by pcelf »

eastwood

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #19 on: April 08, 2010, 05:51:12 AM »
Thank you all guys for good advice! I'd been trying to fix the problem for about 3 hours :) till I got the solution. Installed Linux Mint just yesterday, for the first time ;D
« Last Edit: April 08, 2010, 06:10:55 AM by eastwood »

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 957
  • or #f0; daa; add a,#a0; adc a,#40
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #20 on: April 08, 2010, 04:44:20 PM »
Thank you all guys for good advice! I'd been trying to fix the problem for about 3 hours :) till I got the solution. Installed Linux Mint just yesterday, for the first time ;D

Well, another good distribution which has this limit raised to more reasonable values. So, might be solution for those who don't want to edit one textual file in their system.
Regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

mica

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #21 on: April 10, 2010, 09:19:48 AM »
Firstly thanks to Zilog for providing the information on how to fix this issue.   :)

I can confirm that running sysctl -w kernel.shmmax=128000000 from a command prompt works in my installation of Fedora 12.

For all Fedora users experiencing this problem I can suggest that after looking into how the init process works in this distro it would appear that the most appropriate place to add sysctl -w kernel.shmmax=128000000 is in /etc/rc.d/rc.local.

See http://docs.fedoraproject.org/install-guide/f12/en-US/html/s1-boot-init-shutdown-run-boot.html for details.

HTH

Mica

begsfg

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #22 on: April 10, 2010, 05:14:06 PM »
Zilog, your solution works perfectly. I'll translate it into spanish and publish it in some spanish linux forums.

To help linux newbies, as I am, go to the directory zilog says, then open a terminal, and use the command "sudo", for example in ubuntu would be "sudo gedit rcS" (once you are in the correct directory, probably in a main Terminal sudo gedit /etc/init.d/rcS will work too, but I've not proved). Put the line "echo 128000000 >/proc/sys/kernel/shmmax" before the "exec" one you have, and save it. Using the command sudo you will have to give your administrator password.

In kubunt it's "sudo kate rcS".
Sorry for my bad english.


Thanks Lazaro, This work perfectly for me. Avast appears to be working again.

lavezarez

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #23 on: April 12, 2010, 03:18:15 AM »
Thanks, Zilog, your how-to with one line of code worked and I no longer receive the message
Quote
An error occurred in avast! engine: Invalid argument

I'm using Ubutu 9.10, Kernel Linux 2.6.31-20-generic, GNOME 2.28.1
To reiterate the how-to, I opened a Terminal window and typed:
Code: [Select]
gksu nautilus
1. Navigate to the etc/init.d folder
2. Locate the rcS file
3. Right-click the file, and chose Open with Other Application.
4. Select gEdit for the editing job.
5. Insert the line
Code: [Select]
echo 128000000 >/proc/sys/kernel/shmmaxbefore the exec line.

Final output of the file was:
Code: [Select]
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#
echo 128000000 >/proc/sys/kernel/shmmax
exec /etc/init.d/rc S

Then I rebooted, started Avast by:
Code: [Select]
gksu avastgui
and no more error message  ;D


« Last Edit: April 12, 2010, 03:27:01 AM by lavezarez »

Gort

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #24 on: April 13, 2010, 05:20:47 PM »
Thank you all guys for good advice! I'd been trying to fix the problem for about 3 hours :) till I got the solution. Installed Linux Mint just yesterday, for the first time ;D

Well, another good distribution which has this limit raised to more reasonable values. So, might be solution for those who don't want to edit one textual file in their system.
Regards,
pc

Hints as to other distribution(s) that have more reasonable values?  ;)
« Last Edit: April 13, 2010, 06:23:24 PM by Gort »

Offline zilog

  • Avast team
  • Advanced Poster
  • *
  • Posts: 957
  • or #f0; daa; add a,#a0; adc a,#40
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #25 on: April 13, 2010, 06:30:22 PM »
Thank you all guys for good advice! I'd been trying to fix the problem for about 3 hours :) till I got the solution. Installed Linux Mint just yesterday, for the first time ;D

Well, another good distribution which has this limit raised to more reasonable values. So, might be solution for those who don't want to edit one textual file in their system.
Regards,
pc

Hints as to other distribution(s) that have more reasonable values?  ;)

I think it's not worth searching for such ones in general - adding that simple sysctl -w line to the proper place "fixes" any distribuion, so this is the recommended action.
but, i think in RHEL4AS this limit was raised too (even 3 years ago, IIRC).

regards,
pc
May's Law: Software efficiency halves every 18 months, compensating Moore's Law. (David May, INMOS)

icsopris

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #26 on: April 16, 2010, 06:12:45 PM »
Zilog, your solution works perfectly. I'll translate it into spanish and publish it in some spanish linux forums.

To help linux newbies, as I am, go to the directory zilog says, then open a terminal, and use the command "sudo", for example in ubuntu would be "sudo gedit rcS" (once you are in the correct directory, probably in a main Terminal sudo gedit /etc/init.d/rcS will work too, but I've not proved). Put the line "echo 128000000 >/proc/sys/kernel/shmmax" before the "exec" one you have, and save it. Using the command sudo you will have to give your administrator password.

Thanks to all for the solutions here. I am running Puppy Linux and Zilogs command line fixes my problem when I type it into a console window. I can then open Avast. However, after a restart, it looses the settings. I understand what Lazaro is stating about editing the init.d. However, Puppy is a little different as it requires a script be placed in the /etc/init.d/rcs folder. I am having trouble making a script that works. Anybody out there that can help with the script? Greatly appreciated!

icsopris

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #27 on: April 16, 2010, 06:16:53 PM »
Thanks to all for the solutions here. I am running Puppy Linux and Zilog's command line fixes my problem when I type it into a console window. I can then open Avast. However, after a restart, it looses the settings. I understand what Lazaro is stating about editing the init.d. However, Puppy is a little different as it requires a script be placed in the /etc/init.d/rcs folder. I am having trouble making a script that works. Anybody out there that can help with the script? Greatly appreciated!

pupusse

  • Guest
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #28 on: April 16, 2010, 06:40:06 PM »
quite easy for those who are " afraid"   ??? to modify an .ini script :

if you want to launch avast for the first time in your session :
  type as root : "sysctl -w kernel.shmmax=128000000 ; avastgui "

If you want to launch avast again (in the same session)  just type "avastgui".

                                                   :D
 

But the moderator is right , the best way is to modify the init script.

Offline xode

  • Jr. Member
  • **
  • Posts: 25
Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
« Reply #29 on: April 19, 2010, 07:34:55 PM »
Starting with the 400.vps, version 100328-1, one of it's internal block reached the inner limit 33554432 bytes. It's a kernel variable which
is (quite artificially) limiting the maximum size of any SHM memory block - and 33554432 was a default for some kernels.

Solution? Set the limit to higher values (as root):

sysctl -w kernel.shmmax=128000000
OR
echo 128000000 >/proc/sys/kernel/shmmax

Place those lines to /etc/init.d/rcS or equivalent file (it's distribution-specific a bit - see /etc/inittab, the sysinit runlevel) to have them set automatically (just after boot).

regards,
pc

You might also need to change a line in /etc/fstab which says:

Code: [Select]
/dev/shm   /dev/shm   tempfs   defaults   0 0

to

Code: [Select]
/dev/shm   /dev/shm   tempfs   size=XXXm   0 0

where I made XXX at least 3 times as large as the 128000000 put into /proc/sys/kernel/shmmax