How-To Geek

The 10 Cleverest Ways to Use Linux to Fix Your Windows PC


You might not be ready to accept Linux as your desktop yet, but you can still use it to save your Windows PC—whether you need to reset passwords, recover deleted files, or scan for viruses, here’s how to do it.

What we’ll do today is walk you through some of the most useful ways that you can repair your Windows PC using an Ubuntu Live CD, but keep in mind that most of these tasks can be performed with any version of Linux.

Image modified from Smuggle559′s Broken Windows

Make Your Ubuntu Live CD

The first thing you’ll want to do is make your own Ubuntu Live CD, and while you can just burn an ISO image to a disc and call it a day, you might want to think about creating a customized live CD using reconstructor, which can include custom applications that aren’t included by default.

Alternate: Make Your Ubuntu Live USB

Since carrying around a CD isn’t always the most convenient thing in the world, you might want to also create an Ubuntu Live USB, which is nothing more than a flash drive that has a copy of Linux installed on it, which you can use to boot straight into Linux a lot quicker than using a CD. If you really want to get fancy, you can create a persistent Ubuntu flash drive that saves your settings.

The only problem with this method is that not every PC supports booting from a flash drive, and older PCs are not only more likely to have problems, but they are the ones that are less likely to boot from a flash drive—so you’ll want to keep a Live CD around as well.

Tip: You can also put a copy of Windows 7 on a flash drive, which is very helpful for using System Restore to fix an unbootable PC.

Change or Reset Your Password

Perhaps one of the easiest ways to use Linux to fix Windows is when you’re trying to recover a forgotten password—all you have to do is boot it up and run a few commands, and your password will be reset. It’s really as simple as that. Here’s a couple of ways that you can do this, both for Windows and Linux:

The last one isn’t using the Ubuntu Live CD, of course, but the System Rescue CD is a great tool as well, so we figured we’d include it in the list.

Diagnose Windows or Hardware Problems

There’s a number of ways that you can use Ubuntu to diagnose hardware problems, but the first is really obvious once you think about it—just boot off the Live CD, and start running some applications and test out all the hardware from a working Linux environment. If the system works fine in Linux, the problem is probably a Windows, virus, or driver issue.

You can also run a number tools to more closely check the hardware components—for instance, memtest86+ can do some serious testing on your system RAM to make sure that you aren’t having any problems there, or you can use CPU burn to test out your CPU and motherboard.

Diagnose PC Hardware Problems with an Ubuntu Live CD

Clone Your Hard Drive

If you’ve just replaced your hard drive with a new one, or you simply want to create a backup of your whole system, you can use the Ubuntu Live CD to make a clone of your drive, make a drive image, or even transfer that drive image across the network to another computer for safekeeping. Here’s a couple of the ways that we’ve covered:

Of course, you should make sure to read our guide to exactly what files you should backup from you Windows PC, and keep your PC backed up at all times, but in a pinch, it’s very useful to be able to make a clone of your hard drive.

Recover Data (Like a Forensics Expert)

You don’t need to go to school to become a forensics expert—just read through our article and you’ll be able to recover deleted files using a number of tools directly from the command line. If you’re a serious geek, it’s a very useful set of skills to add to your geek resume.

Recover Data Like a Forensics Expert Using an Ubuntu Live CD

Recover Deleted Files

Accidentally deleted some files off your PC that you really need back? You can use an Ubuntu Live CD to recover the files with a couple of keystrokes from the terminal and get yourself back in business in no time.

Of course, if your PC can boot into Windows just fine you should probably read our guide to restoring accidentally deleted files, but if your PC is unbootable because of a virus or something else, it’s a very useful technique to learn.

Recover Deleted Files on an NTFS Hard Drive from a Ubuntu Live CD

Scan Your Windows PC for Viruses

Virus cleaning is one of the most common repair tasks when dealing with a Windows PC, and the Ubuntu Live CD can really help you here, since there are a number of very good antivirus applications that have Linux versions these days. All you have to do is head into the Synaptic package manager, search for Avast, and install it into the live cd session.

There’s actually a few more steps to it, but it is a fairly easy process. Don’t worry about installing software during a live cd session, because it is only installed into memory… Once you reboot, it will be gone. Hit the link for the full walkthrough.

Scan a Windows PC for Viruses from a Ubuntu Live CD

Securely Wipe Your PC’s Hard Drive

If you need to give away or sell a pc to somebody else, or you just want to make absolutely sure that your hard drive is clean, you can use the Ubuntu Live CD to wipe the drive. This wipe will be secure, with every piece of data being overwritten to make sure nobody can recover anything.

Of course, if you need to wipe drives often, you would be better off making yourself a copy of boot and nuke instead, just because it requires less steps, but if all you have handy is your trusty Ubuntu live cd, this method works perfectly.

Use an Ubuntu Live CD to Securely Wipe Your PC’s Hard Drive

Repair Damaged Backup CDs

Got a backup CD that’s too scratched up to read very well? You can use the ddrescue tool from the command line to recover as much information off that disc as possible, and it’s really not that difficult. Just boot into the Live CD and follow through our guide to recover some files.

Rescue Old, Damaged CDs with an Ubuntu Live CD

Access or Backup Files from Your Dead Windows PC

If your pc just won’t boot, or you can’t get into it because it is overrun with viruses, you can use an Ubuntu live cd as a quick way to get access to your files and copy them to another pc, or external drive. The process is simple enough… Just mount the drive from within the live cd session and then map a drive to another machine.

If you want to move the files from the PC to another computer on your network, or simply back them up to an external drive, you can read through either of these tutorials to get you started.

Note: the two articles cover the same general topic area, but the first one has a lot more coverage of moving the files to another PC, whereas the second article covers some manual tips to troubleshoot problems mounting the Windows disk.

Bonus: Use the Ubuntu Live CD to Browse Without a Trace

This isn’t a recovery technique, but have you ever considered that an Ubuntu Live CD is the ultimate way to browse without leaving any traces? Since there’s nothing installed anywhere, there’s no logs, cookies, or caches to look through. Read through our guide to learn how to enable Flash in the Live CD session as well.

How to Browse Without a Trace with an Ubuntu Live CD

There’s no way that we’ve covered all of the great ways you can use Linux to save Windows—so what are your favorite tips? Share them with your fellow readers in the comments.

Comments (28)

  1. Lamon93

    nice post. thanks!

  2. Darren

    This is a fabulous post! The main image is also brilliant :-D

  3. Wolfen

    Just when I was figuring out what I want to do about diagnosing some problems I am having. Cant tell if its a failing drive, or a few corrupted files. This should make it easier to diagnose at least, and quite possibly repair.

    I never thought about using Linux for this situation.


  4. Vincent

    ha ha.. Windows always waste. im using UBUNTU only.. it rocks…

  5. mikycomputers

    Great post! Thanks alot

  6. Mystraw

    Grt post guys..kp it up

  7. Hatryst

    Imagine life without Linux… We all would be stuck in Windows…

    Imagine life without Windows… Hey, it feels so good :D

  8. RoyalGNZ

    Long Live to Linux!

  9. Hayden

    Great Post. Could you post or send me a link to the custom live CD that you created with all the tools?

    Would be very much appreciated.

  10. Tim

    I new about some of these using a Knoppix some time ago, but Change or Reset Your Password, Repair Damaged Backup CDs or Scan Your Windows PC for Viruses, I never would have known. Very nice!

  11. keltari

    Well, nice list… but you can do all this from a bootable windows cd/dvd/USB drive. You can even do the memory test from the win7 or server 2008 dvd itself.

  12. vineel

    please dont simply go against windows both windows and linux are equally powerfull…….

  13. ankit

    i am sorry but i found this article pretty hard to understand is it possible to have much simpler version?

  14. JimRod

    The article is the Dogs Dangly bits! :-)


  15. DWL

    Thanks. Enjoyed that.

  16. Jim

    keltari – hey that’s cool. I didn’t know people used bootable Windows USB devices. Do you have to purchase a license for the copy of Windows on the USB for each machine you use it on?

  17. Swack100

    Great job … It works….

  18. santosh

    Ubuntu Rox……….

  19. f3rns

    This is an EPIC POST =)

    A friend of mine is having some I don’t know the term freezing problems with her computer it opens three applications messenger, facebook and office 2010 and suddenly everything stops no BSOD just freezes.

    Lets see if ubuntu can save my life.

    Once again epic post.

    Thank you =)

  20. Risa

    Nice post. Thank you very much. Bookmarked.

  21. IT Donut

    Very handy info indeed! We also use Linux for making images of hard drives for ghosting, as well as performing in depth disk scans when there is potential hardware failure on its way.

  22. anon

    when the only tool you have is a hammer…

    I wish the ubuntu fever would stop stealing visibility of much appropriate tools.

    I’d rather use a readymade tool such as systemrescuecd [1], it’s unlikely you need to customize it but if you really want to you can do it [2] or make a live usb version, reset windows password with included ntpasswd, securely delete data [4], check for viruses with included clamav, surf the web with firefox, search for rootkit with chrootkit, clone anything with dd, recover data with photorec or testdisk, run one of the many included floppydisk images:
    – FreeDos allows running DOS programs without proprietary MS-DOS (perfect for upgrading firmware)
    – MemTest+ test the physical memory, and tells if it is damaged or not
    – Gag (Graphical Boot Manager)[23] an easy to use Boot manager (such as LILO)
    – Ranish Partition Manager a bootable partition editor.
    – Aida a powerful hardware enumeration/diagnostic/discovery tool
    – MHDD a low-level Hard Disk Drive Diagnostic. Reports S.M.A.R.T. data, firmware errorlog, runs firmware tests, scans surface reporting access times per sector and much more.
    – DBAN (Darik’s Boot And Nuke) to erase all data from hard drive
    – HDT: Hardware Diagnostic Tool
    – ntpasswd to reset or edit windows passwrods
    – netboot to boot from network
    – super grub disk to fix any grub related problem

    and much more in less than 200MB CD.

    [1] http://www.sysresccd.org/
    [2] http://www.sysresccd.org/Sysresccd-manual-en_How_to_personalize_SystemRescueCd
    [3] http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick
    [4] http://www.sysresccd.org/Sysresccd-manual-en_Secure_Deletion_of_Data
    [5] http://www.sysresccd.org/Sysresccd-manual-en_Backup_data_from_an_unbootable_windows_computer

  23. krjsch

    Wonderful Post. Exactly what i was searching for !!!

  24. ilikefree

    http://www.pendrivelinux.com/ All the tools you need to put Linux or Ubuntu on a USB stick here.
    I used Linux Mint and a persistence file

  25. Uncle David

    EXCELLENT. If it ain’t usefule should be here- this is awesome.

    BTW- I’m looking for matierian on TeanViewer – any ideas?

  26. Uncle David

    so sorry – meant to say IF IT ISN’T USEFUL, IT SHOULDN’T BE HERE.
    This is excellent material which we who work in the field, can really use.

    …and I am looking for materials on teamViewer.

  27. jgan

    superb post! but one thing: whats the difference between “Recover Data (Like a Forensics Expert)” and “Recover Deleted Files?”

  28. Mal

    How about if like me ,your machine is somehow stuck in the wrong security mode. Can this be changed.My PC is stuck in an AD1 windows policy and although I can use it ok, it will not let me make any changes at all. Can Linux fix that sort of thing. It’s definitly a problem with the machine, my user/password credentials are ok on another machine.

Programmer by day, geek by night, The Geek, also known as Lowell Heddings, spends all his free time bringing you fresh geekery on a daily basis. You can follow him on if you'd like.

  • Published 10/12/10