Reviving a Windows Laptop with Linux Tools and ClamAV

Recently, I was helping a Windows-using friend transition from her ten-year-old Windows 10 laptop to a new Windows 11 laptop. All of her important files had been backed up by Microsoft OneDrive, which was a great relief when we logged into the new computer. My friend is a Microsoft Publisher user, and you guessed it: Microsoft has announced the end of life for Publisher in October 2026. Since she’s an Office 365 user, she has until then to export all her Microsoft Publisher files as PDFs or lose the information.

The ten-year-old laptop had become unusable, locked up mid-application with Windows errors, and refused to budge. It was an i3 with 4 gigabytes of RAM that started as a Windows 8 laptop and was upgraded to Windows 10 about five years ago. It had seen better days, but I suggested to my friend that I might be able to resurrect it so she could continue using it with the 2021 version of Microsoft Publisher, which will no longer receive updates. She said, “Sure, I’m happy to have you work your magic!”

I took it home and did a live boot with Linux Mint MATE 22.2, but the Windows drive would not mount. It gave me an error message:

$ wrong fs type, bad option, bad superblock on /dev/sda6

I ran fsck on the drive and got more messages indicating that a bad block existed and needed to be repaired. How could I fix the error from within this live boot environment? That’s when I happened upon ntfsfix. The program was already loaded in the live boot environment. I used lsblk to determine the exact location of the NTFS disk in the disk system and issued the following command:

$ sudo ntfsfix -b -d /dev/sda6

There are several options for the command:

ntfsfix v2022.10.3 (libntfs-3g)

Usage: ntfsfix [options] device
    Attempt to fix an NTFS partition.

    -b, --clear-bad-sectors Clear the bad sector list
    -d, --clear-dirty       Clear the volume dirty flag
    -h, --help              Display this help
    -n, --no-action         Do not write anything
    -V, --version           Display version information

In my case, I used the -b (clear-bad-sectors) and -d (clear-dirty). That command fixed the problem I had with the NTFS partition, and I was now able to download and install Clam Antivirus to clean up the suspected malware causing the issue.

$ sudo apt install clamav

Then I was ready to scan the disk for viruses and malware. I opened a terminal in the mounted Windows drive and entered the following command:

$ sudo clamscan -irv --remove 

Those clamscan options:  only prints files that are infected, r scans directories recursively, and v provides detailed output during the scan. The – – remove option deletes any files that are found to be infected. Be careful with that last option.

The laptop has an i3 CPU and 4 GB RAM, and the process for scanning a 400-gigabyte drive was lengthy. It took overnight to complete the scan, but when I started the laptop in the morning, I was able to log in without difficulty, and my friend is delighted at the prospect of extending the life of her access to Microsoft Publisher.

In the end, what began as a seemingly hopeless situation with a locked-up Windows 10 laptop turned into a valuable lesson in resourcefulness. By combining the flexibility of a Linux live boot, the repair power of ntfsfix, and the thoroughness of ClamAV, I was able to breathe new life into aging hardware and preserve access to software that is nearing its end of support. For my friend, this means more time to safely transition her Publisher files, and for me, it’s a reminder that with the right tools and a bit of persistence, even a decade-old machine can still serve a meaningful purpose.

Leave a Reply