Can I use Ubuntu to diagnose hard drive or RAM problems in Windows?

This may be a crazy question, but here goes...

My brother suggested that I could somehow use either a Ubuntu Live Boot CD or Flash drive or Kubuntu as a way to diagnose issues I'm currently having with my laptop. I'm running Windows 7 and for some reason my laptop has suddenly started freezing during Windows start up. This started immediately after I began seeing the hard drive light remaining on and my computer running very, very slowly - even though when I checked Task Manager it said that no applications or unusual processes were running at the time and CPU usage was 0%. Strange, I know.

I've used the Restore disks 3 times already, thinking maybe it was a virus, even though I run Norton 360 and it found nothing upon a full system scan. But every time I end up with Windows failing to start up at all, or it getting stuck on the "Windows Starting" screen for at least 15-20 minutes before it starts.

I'm at a total loss here. I'm thinking it is either a Hard drive issue or perhaps a RAM issue, but I am a total moron when it comes to the operational aspect of computers. I don't know where to begin. My brother said that if I used a flash drive of Ubuntu or Kubuntu and tried to boot from there that I would know immediately if it was my Hard drive because it wouldn't operate. I don't understand that since it wouldn't be operating off my hard drive, it would be running from the CD/flash drive.

Does anyone have any clues on what I can do to check this out? I'm tempted to buy a new hard drive and RAM, but would hate to buy something I can't return if they aren't the issue.

I'm stuck...any help would be very appreciated. Thanks so much and have a wonderful weekend.


Solution 1:

You have an option for both without the need to install anything else:

Checking your RAM (MemTest)

Simply boot your LiveCD, LiveDVD or LiveUSB and on the first menu you will see the option for Checking you Memory RAM (This option will not show on EFI boot enabled systems. For an explanation of this behavior please visit the MemTest86 Support Page and a Bug Report already present since 2011):

enter image description here

This is most likely the BEST app to check your memory. Simply wait until the first line that says PASS gets to 100% (The one that says 4% on the image below). It will repeat itself but with one pass should be enough:

enter image description here

If you do have a bad memory, you will get at least one RED row on the bottom half of the app. If you get at least one, then you have some serious Memory problems. In the image below, the user has MANY memory problems and should immediately change the RAM:

enter image description here

I suggest to test each memory individually if you do find a memory error. This way you will know which memory slot is the culprit and can simply change that one.

Checking you HDD or SDD

In the LiveCD, LiveDVD or LiveUSB and without any additional installation you have the Disk application. Simply open Dash and type disk, you will see the "Disk Utility" app:

enter image description here

Open it and it will look something like this:

enter image description here

Now select your HDD or SDD and then select the Gear icons to the right. From that menu select the SMART option:

enter image description here

Here you can see the state of the disk, Temperature, Powered on time and any errors it has, any FAILS it has and you can even check it for problems with the Start Self-Test button below:

enter image description here

So as you can see the LiveCD, LiveDVD or LiveUSB comes in handy when you want to do some diagnostics on the computer.

Solution 2:

Yes, you can use a Live image of Ubuntu to diagnose several problems in you HDD (no matter what OS you have installed there). The only thing that matters is the Operating System that is installed has been shutdown properly (no hibernation)

For HDD problems you can use gsmartcontrol.

Boot from Live CD/DVD/USB of Ubuntu and select "Try Ubuntu". Then open a terminal (CTRL+ALT+T) and issue the following commands

sudo apt-get install gsmartcontrol 

Then run in terminal

gksudo gsmartcontrol 

Select your HDD and check the attributes.

enter image description here

If you see any red marked text you will understand the failure of HDD.

For RAM problems you can use a Live image and memtest86+

See here how : Memtest with Ubuntu 12.04 live CD

Solution 3:

As a more recent data point complementing and partially contradicting this answer by @Luis Alvarado, I used a USB flash drive with an ISO image of Ubuntu 14.04 on a Lenovo ThinkPad T420 machine but didn't see any screen offering me the option of a memory test. Instead, my choices were "Test Ubuntu" and "Install Ubuntu" as can be shown in the screen below: enter image description here

The Ububntu USB flash drive was created with USB Creator (usb-creator-gtk from the command line).

Instead, when I created a USB flash drive with an ISO image of Ubuntu 16.04 using the Unetbootin utility, I was offered the following choices:

enter image description here

Caveat: Upon selecting the "Test memory" option you need to press TAB and remove the initrd=/ubninit part from the boot options otherwise you get a message: "cannot load ramdisk with an old kernel image". This is apparently a workaround around a bug of Unetbootin (suggested here, here and here).

I don't think that Ubuntu 14.04 versus 16.04 had any bearing in the ability to run the memory test. Instead I believe it was simply a matter of the utility that was used to create the Ubuntu flash drive. So I think if you use the Unetbootin utility you should still get the memory test option even with modern Ubuntu releases.

update

In the comments section of this answer Luis Alvarado states that this is more of a UEFI vs. BIOS thing as opposed to USB Creator vs. Unetbootin thing. However, the fact remains that on the exact same machine the USB stick created with Unetbootin presented me with the option for a memory test whereas the USB stick created with USB Creator didn't.