I have installed Ubuntu on a computer which hat bad/defective RAM (memtest86+) showed that later.

The thing is I did not have any problems with Ubuntu 14.04 while Windows 7 installed on the same machine bluescreen crashed constantly. I know that there is a Badblocks/badRAM feature possible in the linux kernel and in grub.

Can somebody confirm that the good (in comparison with windows 7) crash-free experience was more than just luck? I.e. does ubuntu probe RAM during install/boot and prevent defective RAM to disrupt system stability? Or was I just lucky that Ubuntu did not crash?

  • 2
    No OS can cope well with faulty RAM. Your only real options is to replace the RAM. – Panther May 7 '14 at 14:54
  • then http://rick.vanrein.org/linux/badram/ is not real? well anyway I asked on askubutu.com because I wanted to know it ubuntu installation tries to check for faulty ram and then to apply badRAM. I need no info that bad RAM is bad. I get that ;) – humanityANDpeace May 7 '14 at 15:40
  • What do you mean by "not real"? The problem with hardware is that once it starts to fail, it usually progresses. If you have a fixed problem , a part of the hard drive or RAM, that is faulty and fixed (does not change or progress), then yes you can work around it. But invariably, the next section fails. It then depends, if it is a part of the ram that holds critical data you will crash. Kernel space = crash. user space = application crash, data loss. At some point the hardware will fail without further warning. What business would take those sorts of risks? No hardware lasts forever. – Panther May 7 '14 at 16:30

Linux does not, by default, do anything that would make it possible to run reliably on a system with bad RAM. The badram project, and other similar projects, come from an era when memory was less reliable and more expensive. You may still be able to still compile it, but most likely you will find that the patches (which the Ubuntu wiki suggests are for kernel 2.6.20 - over 7 years old now) - have suffered bitrot, and nobody cares, because there are only a few people in the world running Linux on systems that are known to have bad memory.

| improve this answer | |

It can cope with bad ram, but not out of the box.

I found the easiest and most robust way for me is to add a kernel parameter memtest=4 to my Grub config. This adds a couple of seconds to bootup where the kernel checks your ram and then marks them as bad for you \o/ (thank God as I'm not able to replace my ram in this Covid19 lockdown)

  1. sudo nano /etc/default/grub
  2. update this line:
    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash memtest=4"
  3. sudo update-grub
  4. reboot
  5. optionally check that it is working by running dmesg and see logs like this:
    • [ 5.043917] aaaaaaaaaaaaaaaa bad mem addr 0x0000000581a90000 - 0x0000000581a90010 reserved


| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.