Scan a Windows PC for Viruses from a Ubuntu Live CD

Note: This article is part of our archive and is likely out of date.
(Links may not work, downloads have not been recently tested for safety)

By Trevor Bekolay on April 6th, 2010

Getting a virus is bad. Getting a virus that causes your computer to crash when you reboot is even worse. We’ll show you how to clean viruses from your computer even if you can’t boot into Windows by using a virus scanner in a Ubuntu Live CD.

There are a number of virus scanners available for Ubuntu, but we’ve found that avast! is the best choice, with great detection rates and usability.

UPDATE

This article was written a while ago, and almost all of the anti-virus applications for Linux aren’t supported anymore. Here are the ones that still work:

You should be able to install Clam from the Ubuntu application center.

The better solution, however, is to use the BitDefender Rescue CD to scan your PC.

 

Read Below For Archive Purposes Only

Unfortunately, avast! does not have a proper 64-bit version, and forcing the install does not work properly. If you want to use avast! to scan for viruses, then ensure that you have a 32-bit Ubuntu Live CD.

If you currently have a 64-bit Ubuntu Live CD on a bootable flash drive, it does not take long to wipe your flash drive and go through our guide again and select normal (32-bit) Ubuntu 9.10 instead of the x64 edition. For the purposes of fixing your Windows installation, the 64-bit Live CD will not provide any benefits.

Once Ubuntu 9.10 boots up, open up Firefox by clicking on its icon in the top panel.

sshot-1

sshot-2

Click on the Download tab, and then click on the link to download the DEB package.

sshot-3

Save it to the default location.

sshot-4

While avast! is downloading, click on the link to the registration form on the download page. Fill in the registration form if you do not already have a trial license for avast!.

sshot-5

By the time you’ve filled out the registration form, avast! will hopefully be finished downloading.

Open a terminal window by clicking on Applications in the top-left corner of the screen, then expanding the Accessories menu and clicking on Terminal.

sshot-6

In the terminal window, type in the following commands, pressing enter after each line.

cd Downloads
sudo dpkg –i avast*

sshot-7

This will install avast! on the live Ubuntu environment.

To ensure that you can use the latest virus database, while still in the terminal window, type in the following command:

sudo sysctl –w kernel.shmmax=128000000

sshot-7b

Now we’re ready to open avast!. Click on Applications on the top-left corner of the screen, expand the Accessories folder, and click on the new avast! Antivirus item.

sshot-8

You will first be greeted with a window that asks for your license key. Hopefully you’ve received it in your email by now; open the email that avast! sends you, copy the license key, and paste it in the Registration window.

sshot-9

avast! Antivirus will open. You’ll notice that the virus database is outdated.

sshot-10

Click on the Update database button and avast! will start downloading the latest virus database.

sshot-11

To scan your Windows hard drive, you will need to “mount” it. While the virus database is downloading, click on Places on the top-left of your screen, and click on your Windows hard drive, if you can tell which one it is by its size.

sshot-13

If you can’t tell which is the correct hard drive, then click on Computer and check out each hard drive until you find the right one. When you find it, make a note of the drive’s label, which appears in the menu bar of the file browser.

sshot-xx

Also note that your hard drive will now appear on your desktop.

sshot-14

By now, your virus database should be updated. At the time this article was written, the most recent version was 100404-0.

sshot-12

In the main avast! window, click on the radio button next to Selected folders and then click on the “+” button to the right of the list box. It will open up a dialog box to browse to a location.

sshot-15

To find your Windows hard drive, click on the “>” next to the computer icon. In the expanded list, find the folder labelled “media” and click on the “>” next to it to expand it. In this list, you should be able to find the label that corresponds to your Windows hard drive.

sshot-16

If you want to scan a certain folder, then you can go further into this hierarchy and select that folder. However, we will scan the entire hard drive, so we’ll just press OK.

sshot-17

Click on Start scan and avast! will start scanning your hard drive.

sshot-19

If a virus is found, you’ll be prompted to select an action. If you know that the file is a virus, then you can Delete it, but there is the possibility of false positives, so you can also choose Move to chest to quarantine it.

sshot-18

When avast! is done scanning, it will summarize what it found on your hard drive. You can take different actions on those files at this time by right-clicking on them and selecting the appropriate action. When you’re done, click Close.

sshot-20

Your Windows PC is now free of viruses, in the eyes of avast!. Reboot your computer and with any luck it will now boot up!

Conclusion

Running avast! from a Ubuntu Live CD can clean the vast majority of viruses from your Windows PC. This is another reason to always have a Ubuntu Live CD ready just in case something happens to your Windows installation!

Trevor is our resident Linux geek, but always keeps his eyes open for neat Windows tricks too.

  • Published 04/6/10
More Articles You Might Like

Enter Your Email Here to Get Access for Free:

Go check your email!