How can I check my RAM and hard drive for errors?
Boot with Ubuntu Live CD/USB stick (or press & hold Shift before the splash screen, to enter GRUB menu), and select TEST MEMORY with memtest86+
! See this illustration, don't wait for graphical UI!
Illustration:
To test HDD, you can use S.M.A.R.T. data reader, palimpsest disk utility, press Super/Dash button, start typing Disk Utility (for Gnome: System > Administration > Disk utility), and check your S.M.A.R.T. data (YOU MUST UNMOUNT THAT DISK FIRST, YOU WANT TO CHECK ITS FILESYSTEM - that's why, use a Live CD/USB stick - for S.M.A.R.T. reading, the disk could be mounted/used)!
Illustration:
For HDD, you can use badblocks
program which is installed with the e2fsprogs
program. It's a command-line program and a read-only scan can be performed with:
sudo badblocks -v /dev/sda
-v
causes verbose information to be displayed, /dev/sda
is the device name of the disk.
For RAM, you can find memtest86+
on any live CD or USB. It'll prompt you if there's something wrong with your RAM.
Hard disk:
open up a command line, (Applications → Accessories → Terminal) and type
sudo touch /forcefsck
then reboot your computer. The operating system will perform a hard disk check (fsck) for you during the boot.
Ram:
When the system is booting, just after the POST (power-on self test) screen, hit the ESC key a few times until you see the GRUB boot menu.
You should see a list of different Linux kernels. Right at the bottom, there's an option captioned somethimg like Memtest86, this will thoroughly test your memory for corruption (also, it will take ages).