I'm Trying to Run a ClamAV Scan on my Linode, but it Keeps Getting Killed

Linode Staff

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.

  1. Return to the Rescue tab of your Linode in the Cloud Manager
  2. For the /dev/sda dropdown, select your Linode's normal filesystem disk.
  3. For the /dev/sdb dropdown, select your Linode's swap disk.
  4. (Optional) Add any other disks you'd like to scan.
  5. Click submit, and wait for your Linode to reboot.
  6. Once your Linode has rebooted, click Launch Console in the upper-left corner to access your Linode via the Lish console.
  7. 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!

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct