So.. Memtest tells you have bad ram! Here are your easy options:
- Buy new ram
- Turn off everything after the bad memory* (mem=###M option)
- Turn off just the memory around the bad memory* (memmap=#M$###M option)
*May require moving RAM around in the computer for best results.
Testing The Memory
Tool 1: Memtest
There is the classic Memtest which is on every Ubuntu LiveCD and most other Free operating system CDs. It tests memory and gives you back fun technical numbers and also what sectors are bad in the easier form of 797M or 84M. It’s the easier number we want. So try to write down the range (if applicable) of bad results.
Tool 2: Memtester
Memtester (click here to install) is like memtest only it runs from a command line once Ubuntu has loaded. It can’t test your whole ram so you should make sure that it would be testing the area that memtest has detected being bad.
You absolutely need to run it with sudo/root.
WARNING: Don’ try to test your whole RAM, just say 100M over where the error is. Doing really close to your actual total ram will make your computer unresponsive (unless you are following this with nothing but a shell, then you might be fine).
Ex. Let’s say you have 150M taken up by your OS, the badram is at 797M (from memtest) and you have 1024M total memory.
This command would work:
sudo memtester 750M
Option 1 – Buy New Ram
Simple. Easy. Safest. Might be cheap if your computer supports new ram. Wastes hardware that we could likely get to work. Some people say that once RAM starts to go, it will just keep getting worse, I personally don’t believe them.
I will not be liable for you losing data by using bad RAM. Use YOUR own judgment.
Option 2 – Turn off everything after the bad memory (mem=###M option)
This is simple take the lowest number from memtest, subtract let’s say 3 from it for a bit of safety. Then add it to your kernel command line for bootup.
Ex. So for bad memory at 797M we would add to the default kernel options:
Option 3 – Turn off just the memory around the bad memory (memmap=#M$###M option)
WARNING: This is much less tested than Option 2. There may be bugs lurking about.
This isn’t much more difficult. Instead of just stopping at 795M, we are going to stop at 795M but then only ignore the next 10M. If there are multiple places try to make a range that includes them both.
Ex. So for bad memory at 804M and 806M we could use:
But for this option I will fell better if you use memtester afterwards to make sure you actually got the right memory spot. (And maybe do it before too, too make sure you actually were testing the right spots in the test)
HowTo Kernel Default Options
Edit the file /boot/grub/menu.lst with sudo/root
(ex. sudo nano /boot/grub/menu.lst)\
Navigate to here
## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=f0906667-bcde-4b64-86bc-5a47320d5517 ro
Edit the line (DO NOT GET RID OF THE #):
# kopt=root=UUID=f0906667-bcde-4b64-86bc-5a47320d5517 ro (add mem stuff here)
Thanks for following my HowTo. Many happy PCs and memory modules saved from landfills.