Avast WEBforum

Business Products => Avast Business => Avast Business for Linux => Topic started by: zilog on March 29, 2010, 03:57:15 PM

Title: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: zilog on March 29, 2010, 03:57:15 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: spg SCOTT on March 29, 2010, 04:00:58 PM
Hi zilog,

Not a linux user, but is this related to the post here:

http://forum.avast.com/index.php?topic=57772

-Scott-
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: SAFENSECURE on March 30, 2010, 02:03:15 AM
Hello,

I was able to get by the error message when trying to update my AVAST engine on Ubuntu 9.10.

Make sure you are in your home directory by typing pwd. Next, type ls -a; which should show all hidden files/directories.
Then navigate to the avast directory (cd .avast), you will see the following file name 400.VPS. Remove this file. There seems to be a size limitation or something. You may have to do this with root or sudo.

After removing the 400.vps file from the hard drive, I was then able to launch the Avast Application and run an update.

Thanks
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: buffboy on March 30, 2010, 05:49:43 AM
I did safensecure's trick as I was having the same problems as other posters. After, I could run the avast scanner. Unfortunately it seems the virus that destroyed my windows 2000 made it over to the gOS I put on this in my backup files. My worst fears have come to pass. When avast hit it again, avast crashed hard(I'm now running on the boot disk) just like it did with W2K. It has apparently taken my gOS startup files on the hard drive with it, again just like W2K. So much for the myth that viruses that infect windows won't hurt linux.  I'm going to try a few more things as I've got a bunch of hours in this install and I want to try isolate this bug so I can send it to you guys.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on March 30, 2010, 01:00:14 PM
Hello,

I was able to get by the error message when trying to update my AVAST engine on Ubuntu 9.10.

Make sure you are in your home directory by typing pwd. Next, type ls -a; which should show all hidden files/directories.
Then navigate to the avast directory (cd .avast), you will see the following file name 400.VPS. Remove this file. There seems to be a size limitation or something. You may have to do this with root or sudo.

After removing the 400.vps file from the hard drive, I was then able to launch the Avast Application and run an update.

Thanks

As was written earlier, this won't help. So again, once more:

- in some kernels, there's a 32MB limitation for SHM block size by default (which can be altered in runtime, using sysctl)
- in latest VPS, this limit was reached by one part of the 400.vps. so at least in the future, you MUST alter the nonsensually-small default

(removing 400.vps causes the engine to use the spared older one, which will "work", but obviously doesn't solve the real cause)

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lazaro on March 31, 2010, 06:07:20 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.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Mike Buxton on March 31, 2010, 08:12:12 PM
Hi zilog,

I tried to apply your advice, but despite many different attempts I had no success.

As Lazaro managed to implement your advice the pictures below show my attempted replication:

(http://j.imagehost.org/t/0410/rcS.jpg) (http://j.imagehost.org/view/0410/rcS)

I would be grateful for any further help.

My regards to all

PS Running Xubuntu desktop via Ubuntu 9.10

Addendum:

After many reboots (with no further changes except for multiple deletions of ¨stale lock¨ files - perhaps as a result of some incorrect adjustments I made) avast! has now worked normally. Thanks for your help.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: LoveTerri on March 31, 2010, 08:56:42 PM
To zilog and Lazaro,

Thank you so much for your advice and explanations.

It worked perfectly on my Ubuntu 9.10 system.

Regards,
Terri (Linux Newbie!)
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 01, 2010, 01:52:00 PM
Hi zilog,

I tried to apply your advice, but despite many different attempts I had no success.

As Lazaro managed to implement your advice the pictures below show my attempted replication:

(http://j.imagehost.org/t/0410/rcS.jpg) (http://j.imagehost.org/view/0410/rcS)

I would be grateful for any further help.

My regards to all

PS Running Xubuntu desktop via Ubuntu 9.10

Addendum:

After many reboots (with no further changes except for multiple deletions of ¨stale lock¨ files - perhaps as a result of some incorrect adjustments I made) avast! has now worked normally. Thanks for your help.

Probably wrong place, because your /proc filesystem isn't mounted yet (place it to the script which is executed when all FSs or at least procfs are mounted). But also, you can use /sbin/sysctl -w kernel.shmmax=128000000 - this version is procfs-independent.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 02, 2010, 03:24:50 AM
Appeared in my Kubuntu 10.04 Beta and the solution worked like a charm.
By the way, shouldn't the command be a part of the .deb package?
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 02, 2010, 10:56:22 AM
Appeared in my Kubuntu 10.04 Beta and the solution worked like a charm.
By the way, shouldn't the command be a part of the .deb package?

Hallo,
this variable is global, system specific. Other product, affected by this (databases especially), don't change this SHM limit by default. It's rather up on the distro developers, to raise this limit, or, better, on the kernel developers, to get rid of the years old default. The reason is that it's not very clean when an application customises silently system-global settings to fit its requirements in a persistent way.

But, as it seems, we'll have to add it in the unshot.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: brianshel on April 02, 2010, 01:51:14 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.

Just for information, this also worked perfectly on Mint 8 Helena, as you would expect as it's based on Ubuntu 9.10.

Thanks for solving a frustrating problem!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 02, 2010, 02:29:01 PM
But, as it seems, we'll have to add it in the unshot.
You can add a readme file and the information and/or disclaimer.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 02, 2010, 03:32:40 PM
Upgrading the kernel, the problem comes back and the user needs to apply the limit again.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: YukonGuy on April 02, 2010, 06:23:23 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?  That's kind of screwed up don't you think?  I'm sure that there are those who would argue with me about this point.  Prior to consider doing so think about what this kind of problem does to and for newbie Linux users.

This solution is fine for those of us who are used to "playing around under the hood".  Fix the product not the user.

Regards,

YukonGuy
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Fuerteventura 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!.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro 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.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: chudtrooper 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: pcelf 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.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: eastwood 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: mica 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 (http://docs.fedoraproject.org/install-guide/f12/en-US/html/s1-boot-init-shutdown-run-boot.html) for details.

HTH

Mica
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: begsfg 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.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: lavezarez 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


Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Gort 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?  ;)
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: icsopris 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!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: icsopris 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!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: pupusse 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.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: xode 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
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 19, 2010, 09:21:51 PM

Hallo,
this /dev/shm (which is a directory in the fact) has nothing to do with this SHM issue, and even with the SHM. It's just another historical location (mount-point), where old-fashioned *nix people tend to mount tmpfs "inflatable" ramdisk on the fly.

So, there's no need to do this (but, if you are interested what's really that marverlous tmpfs is, read this, for example: http://www.ibm.com/developerworks/library/l-fs3.html).

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 21, 2010, 10:14:40 PM
If the user is testing a distro, like Kubuntu beta, each kernel update losts that setting.
Isn't there a workaround for that? It's a pain having to run that command each time...
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 21, 2010, 10:54:20 PM
If the user is testing a distro, like Kubuntu beta, each kernel update losts that setting.
Isn't there a workaround for that? It's a pain having to run that command each time...
hallo,
I doubt that the kernel update modifies your customised /etc/init.d/rcS, even on ubuntu/kubuntu (ubuntu is an african word for "it doesn't work" :) - do you mean that after kernel re-starting, modified sysctl variable is lost?
yes, but that's why one might decide to put it in that rcS initscript.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 22, 2010, 02:34:54 AM
I doubt that the kernel update modifies your customised /etc/init.d/rcS, even on ubuntu/kubuntu (ubuntu is an african word for "it doesn't work" :) - do you mean that after kernel re-starting, modified sysctl variable is lost?
I've upgraded Kubuntu installation. Boot. After that, I had the same problem of updating.
I'm guessing it was the kernel, but could be anything else that was updated (a package, etc.).
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 22, 2010, 01:29:53 PM
I doubt that the kernel update modifies your customised /etc/init.d/rcS, even on ubuntu/kubuntu (ubuntu is an african word for "it doesn't work" :) - do you mean that after kernel re-starting, modified sysctl variable is lost?
I've upgraded Kubuntu installation. Boot. After that, I had the same problem of updating.
I'm guessing it was the kernel, but could be anything else that was updated (a package, etc.).

when the sysctl is correctly in rcS, it will plug the right limit into any kernel, early enought to be ready when avastgui comes up. so, probably, your line in rcS wasn't correct (or the rcS was modified back?).

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 22, 2010, 01:42:54 PM
zilog, I don't know the undergrounds of Linux... I'm always a newbie in Linux...
I don't know what happened and what's happening. I can just report the things I'm experiencing...
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 22, 2010, 02:00:13 PM
zilog, I don't know the undergrounds of Linux... I'm always a newbie in Linux...
I don't know what happened and what's happening. I can just report the things I'm experiencing...
just check whether your modification of rcS is still there. If so, please check whether the path si full (/sbin/sysctl) and whether the line preceedes the exec line.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 22, 2010, 02:12:20 PM
I doubt that the kernel update modifies your customised /etc/init.d/rcS
I have this ???
Code: [Select]
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

exec /etc/init.d/rc S
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 22, 2010, 02:13:14 PM
sysctl -w kernel.shmmax=128000000
Works for me.

echo 128000000 >/proc/sys/kernel/shmmax
Permission denied (even using sudo).

Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 22, 2010, 04:07:39 PM
I doubt that the kernel update modifies your customised /etc/init.d/rcS
I have this ???
Code: [Select]
#! /bin/sh
#
# rcS
#
# Call all S??* scripts in /etc/rcS.d/ in numerical/alphabetical order
#

exec /etc/init.d/rc S

place that /sbin/sysctl -w .....
just there, before the exec. that's it.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 23, 2010, 03:31:53 AM
Tried, and seems I need to boot. Does not work at the first...
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 23, 2010, 04:06:46 AM
Worked after the boot.
But now, a connection issue?
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on April 23, 2010, 10:31:14 PM
Tried, and seems I need to boot. Does not work at the first...

of course. what you need is to change the in-kernel default. because each boot starts with them, you must issue sysctl -w ... upon each boot. that's why it's in the rcS script, which is executed when system is booting. of course, if you need instant help w/o reboot, issue the command directly.

shm has nothing to do with tcp/resolver, so this error with connectivity is probably totally unrelated.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Lisandro on April 23, 2010, 10:34:16 PM
I'll try again. Thanks zilog for your constant help.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Ickx on May 19, 2010, 10:18:47 AM
Hi!
I'm Fedora 12_i586 user and I have simple solution how to get 'avast! Linux Home Edition version 1.3.0' to work...
I have an error "Bad argument ..." while I try to update database today.
I've just edit file /etc/rc.d/rc.sysinit like this:
Code: [Select]
#!/bin/bash
#
# /etc/rc.d/rc.sysinit - run once at boot time
#
# Taken in part from Miquel van Smoorenburg's bcheckrc.
#


# upsizing shm by Ickx
sysctl -w kernel.shmmax=128000000
# end edit by Ickx ;)

HOSTNAME=$(/bin/hostname)

set -m
...
;D
then reboot - it's working!
Title: HOW TO Avast4Linux doesnt work with latest VPS 100328 1 and later
Post by: VioppyEssep on June 18, 2010, 07:37:50 AM
Ok, Im completely new to Linux, but I managed to get Audacity installed, but when I try to play something theres no sound.  I know my sound card works, because Rhythmbox is working perfectly.  Do I need to configure it or something?  How do I do that?  Im running Linux Mint 8, btw.
Title: Re: HOW TO Avast4Linux doesnt work with latest VPS 100328 1 and later
Post by: zilog on June 18, 2010, 12:47:07 PM
Ok, Im completely new to Linux, but I managed to get Audacity installed, but when I try to play something theres no sound.  I know my sound card works, because Rhythmbox is working perfectly.  Do I need to configure it or something?  How do I do that?  Im running Linux Mint 8, btw.

Isn't avast-related, but in general - all those bloats can be best analysed using strace -f, and you will see what device (instead of the proper DSP one) was accessed. Then, locate it in config files/try to modify configuration to get it work properly.

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: frankcox458 on September 09, 2010, 06:17:50 AM
For those using Puppy Linux 431 this worked for me.

Just copy the command posted to rc.local . It is all that is there but everything works now but the desktop,sh file so I drug avastgui to the desktop and it opens fine that way.

Thanks for the tip!

As far as the problem with Audacity I suspect you need to tell audacity where your sound card is. I have it in Puppy and Ubuntu 9.04 and no worries.

Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: nacho32 on October 06, 2010, 11:41:09 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?  That's kind of screwed up don't you think?  I'm sure that there are those who would argue with me about this point.  Prior to consider doing so think about what this kind of problem does to and for newbie Linux users.

This solution is fine for those of us who are used to "playing around under the hood".  Fix the product not the user.

Regards,

YukonGuy
I could not agree with you more will stay with BT-defender until they fix their broken software
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zilog on November 23, 2010, 10:32:30 AM
Hallo,
nothing is "brokend" and there's no fixing. Just the memory requirements of the virus database are continuously rising, and the (nonsensual) historical limit on some systems, 32MB, isn't sufficient.

There's no need to fix anything, just tell your system that you will need more. See the first sticky post. Because avast4 workstation is per-user installable app, it shouldn't silently modify system-wide settings (and mustn't, we're on unix).

regards,
pc
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: frogdos on March 15, 2011, 05:55:36 PM
thanks for that, zilog. I edited the rcS file (echo 128000000 >/proc/sys/kernel/shmmax) as you suggested and avast now works fine on my #! statler machine.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: TomLovesPat on April 21, 2011, 12:26:03 AM
Hello All,

The Updates for Unbuntu have 'caused' this problem to reccur. I found that the /etc/init.d/rcS
file gets replaced periodically.

Thanks to this forum I have had no problem fixing the file each time by following zilog's suggestions
found earlier in this and other posts.

Thanks to to all of the moderators and others who help us beginners.

Best Regards, ;D
Tom
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: zekemx on August 07, 2011, 11:35:59 AM
Today I downloaded the new ESET NOD32 Antivirus 4 for linux and I was amazed to see it's GUI, The GUI looks great and fast and it also removed 6 viruses from a friends Windows Hard Drive. (I was using Linux to scan it)

But after NOD32 finished I ran Avast for Linux.

I was amazed to se that Avast detected and cleaned a windows rootkit that NOD32 did not even noticed.

I would love to see Avast for linux on pair in features to the windows version of Avast.. I would definitely buy it.

Extra protection is very important for me. I am relly thinking of buying NOD32 and have that extra protection with Avast for linux.

Does Avast for Linux has Spyware detection too?.

Regards
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: bradski on August 22, 2011, 01:39:53 AM
I actually got the "Avast cannot initialize, invalid argument" error in fedora 15.

The fix using this command worked for fedora 15:

echo 128000000 >/proc/sys/kernel/shmmax

I also added it to the end of /etc/rc.d/rc.local

no more problems ... avast updates and runs like a champ.

Thanks!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: simonmcnair on October 30, 2011, 09:28:44 PM
if you're using Ubuntu the bestway to modify sysctl is via /etc/sysctl.conf and add the line
kernel.shmmax=128000000
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: soltaran on March 31, 2012, 09:08:01 AM
Create a text file called 30-avast in /etc/sysctl.d with the kernel.shmmax=128000000 as the only entry.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: Abraxas on May 28, 2012, 10:22:22 PM
Today I downloaded the new ESET NOD32 Antivirus 4 for linux and I was amazed to see it's GUI, The GUI looks great and fast and it also removed 6 viruses from a friends Windows Hard Drive. (I was using Linux to scan it)

But after NOD32 finished I ran Avast for Linux.

I was amazed to se that Avast detected and cleaned a windows rootkit that NOD32 did not even noticed.

I would love to see Avast for linux on pair in features to the windows version of Avast.. I would definitely buy it.

Extra protection is very important for me. I am relly thinking of buying NOD32 and have that extra protection with Avast for linux.

Does Avast for Linux has Spyware detection too?.

Regards

I feel it must be stressed that Linux is not windows, as simple as that may seem.  ;)
There's really not a lot that your Linux System will succumb to as far as Malware. Being an active member of your Distros community, and asking anything that concerns you is a great help, in fact essential. You will also find that the Security of your Browser is probably a great place to start patching any weaknesses. Then again, that is a minor issue. There are not Viruses for Linux. THere are bad practises however, thus reading, asking questions is the go  ;)

Looking for Viruses on a Linux System is very 'Microsoft'. In fact you say you looked for Viruses on a Windows Comp using a Linux Comp.

Time to forget Viruses, and learn good practises. We fall into a mindset that there are Viruses everywhere, which of course there are in a Windows environment.

Just enjoy Linux, and read up at your Distros site, ask the Senior members questions, and read.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS (100328-1 and later)?
Post by: ghost123uk on December 31, 2012, 07:22:14 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.

Thank goodness for your input Pedro  :)

When I read "zilog's" original post on how to fix this fault in the installation of Avast I said to my self "here we go again" as I barely understood any of it, esp the last bit  :( =
Quote
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).

That line just made no sense until I read your simple guide, then I understood what was required.

For someone new and trying hard to "learn" Linux they don't half "shoot themselves in the foot" by making it so hard to understand.

Done on purpose I suspect, to "keep it in the family"  :o No wonder Linux is only really suitable for geeks and not the "public" !

Big thanks Pedro  :)


Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: Abraxas on January 01, 2013, 06:29:28 AM
ghost123uk, what was causing problem was explained, by Tech:on  03 April 2010.
Quote
The size of the virus definitions database reached a system limit.
This happened with Windows 98 and was corrected by the program itself.
zilog; on 29 March 2010 explained the 'Fix'  in Technical terms
Fuerteventura kindly wrote out a step by step process.
Avast ! 4 Linux had the solution 2 years ago.
Where have you been ?
Now; every Distro is different. They all change, that's why packets are updated, also all programs must be adapted to Kernel changes as they occur. Nothing is Static.

In the two years since this problem evolved, and was solved you've had plenty of time to ask at the Forum of whatever Distro you use, or ask in this thread how to. That is the only difference between yourself, and someone who can use an ever increasingly GUI based Linux. Just ask appropriately, and you shall learn.  ;)
Please refrain from misleading and aggressive posting, you aren't helping anyone.
Quote
Quote from: zilog on 29 March 2010, 23:57:15

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).

 
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: kevpan815 on January 13, 2013, 11:29:55 PM
Thanks for sharing, It was a real simple process on Ubuntu 13.04 Nightly Build: Even though the Root Account is Locked in these Later Ubuntu Builds, I just simply typed in Sudo followed by the first of your 2 Commands.  :)
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: silviucc on March 01, 2013, 12:39:37 PM
Quote
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).

It would probably be better if

kernel.shmmax=128000000

was added to /etc/sysctl.conf file

Messing with init scripts can get... messy.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: mintlxdeuser on May 24, 2013, 02:33:10 PM


It would probably be better if

kernel.shmmax=128000000

was added to /etc/sysctl.conf file

Messing with init scripts can get... messy.

Thanks, I did exactly that and it now works fine. I'm running Mint LXDE 9. To edit the file I did the following.
1. ran pcmanfm2 as root using sudo command.
2. changed to the etc folder and opened the conf file with leafpad.
3. saved the change.
4. rebooted. job done.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: dschinn1001 on July 02, 2013, 05:16:38 PM

The somewhat "hilarious"-looking problem is similiar like here ( and it is solved here ! ) :

http://forum.avast.com/index.php?topic=126957.0
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: Kevjonesin on July 10, 2013, 10:59:12 PM
Quote
better if

kernel.shmmax=128000000

was added to /etc/sysctl.conf file

...for the win! :  }

Thanks to simonmcnair, Silviu C., mintlxdeuser, and anyone else who may have suggested the elegant solution above. It worked great in Linux Mint 13 XFCE.

I launched a text editor (gedit) with root permissions...
Code: [Select]
gksu gedit ...via a command line and then opened...
Code: [Select]
/etc/sysctl.conf ...with it. Added...
Code: [Select]
kernel.shmmax=128000000 ...to the bottom of the page and then saved and rebooted. Avast launched just fine after that.
 
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: Starfox on September 24, 2013, 11:44:56 AM
Hi,

I have Suse 12.3 installed.

Which File I can use here for changing the shmmax on startup ?

I have in /etc/init.d only the File "rc" or I can use sysctl.conf too ?
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: mitsos karam on October 13, 2013, 02:34:24 AM
Thanks to all who helped for the solutions. I have PCLinuxOS4.10.5 and I used the solution of sysctl.conf. After the reboot avast updated the database without problems. I think that Starfox can do the same safely.
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: aniketshinde on December 13, 2013, 04:11:36 PM
Hey, i am a newbie to linux. I am using ubuntu 12.04. i installed i32 libs first (mine is 64 bit lappy) and then avast!. It worked. But after updating i got the same message as everyone  "an error occurred in avast! engine: invalid argument". Will someone please tell me step by step how should i go? if it is already mentioned in previous posts, please tell me which to refer and what modifications to make.. i tried reading them but could not get anything....  :(
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: aniketshinde on December 15, 2013, 09:19:52 AM
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

Please help!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: aniketshinde on December 15, 2013, 03:04:08 PM
Problem Solved! Thanks to all !!!
Title: Re: HOW-TO: Avast4Linux doesn't work with latest VPS ("cannot initialize, invalid")?
Post by: mintlxdeuser on December 20, 2013, 03:48:53 PM
Glad you got it working. I've just switched to Fedora 20 LXDE Spin. Managed to get avast! working again.

This time editing /usr/lib/sysctl.d/00-system.conf

 I made a couple of exclusions as well in the avast GUI to prevent the program closing on scans. The two folders below caused the program to close both on my normal account and root because of permission denial. Given it is SELinux they should be safe to exclude from scans without risk of infection? I believe rightly or wrongly as long as the /home and all other accessible directories are clean those two should be okay?

/sys
/run