I'm Trying to Run a ClamAV Scan on my Linode, but it Keeps Getting Killed
I've booted my Linode into Rescue Mode and downloaded ClamAV, but when I try to run a scan it just ends in the word Killed
without any other information. What's going on, and how can I fix it?
1 Reply
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
Rescue
tab of your Linode in the Cloud Manager - For the
/dev/sda
dropdown, select your Linode's normal filesystem disk. - For the
/dev/sdb
dropdown, 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 Console
in the upper-left corner to access your Linode via the Lish console. - Within the Rescue Mode environment, execute the following command:
swapon /dev/sdb
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 Swap
row.
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!