I'm Trying to Run a ClamAV Scan on my Linode, but it Keeps Getting Killed
This is a somewhat unusual problem, which appears to be caused by the ClamAV process eating up all the memory on the Linode and having to be killed to keep the system running. Normally the operating system would swap information out of memory, but since the Finnix-based Rescue Mode environment can be booted into without a swap disk attached, by default there is no space to swap to.
Fortunately, this is a pretty easy problem to work around.
- Return to the
Rescuetab of your Linode in the Cloud Manager
- For the
/dev/sdadropdown, select your Linode's normal filesystem disk.
- For the
/dev/sdbdropdown, select your Linode's swap disk.
- (Optional) Add any other disks you'd like to scan.
- Click submit, and wait for your Linode to reboot.
- Once your Linode has rebooted, click
Launch Consolein the upper-left corner to access your Linode via the Lish console.
- Within the Rescue Mode environment, execute the following command:
You can confirm that this worked by running
free -m after swapping on the swap disk.
root@ttyS0:~# free -m total used free shared buffers cached Mem: 1998 150 1847 0 10 40 -/+ buffers/cache: 99 1898 Swap: 0 0 0 root@ttyS0:~# swapon /dev/sdb root@ttyS0:~# free -m total used free shared buffers cached Mem: 1998 151 1846 0 10 41 -/+ buffers/cache: 100 1897 Swap: 511 0 511
As noted above, after swapping on, we've now got non-zero values for the
From there, you'll just need to install
ClamAV and mount the disk(s) you'd like to scan, and you'll be good to go!