Badram in Mate 16.04

Hi, i’m Daniel, new in Mate 16.04. I need to block some bad Ram sectors but i don’t know how.

If the RAM is bad then you need to replace it.

Hello Daniel,

I would have to agree with malwaredpc, but being a person who lives in a relatively remote area myself I can understand you wanting to try to keep your computer going a little longer until you are able to organize the right replacement parts.

There is a line you can enable in your grub configuration file which will allow you to have Gnu-Grub pass information to the linux kernel on boot up about which sectors of memory you want the kernel to avoid.

Here are a couple of links:
https://www.gnu.org/software/grub/manual/html_node/badram.html — Gnu Grub Manual on Bad Ram

https://help.ubuntu.com/community/BadRAM – BadRAM - Ubuntu Communuty Docs

You will need to run memtest86+ first from your grub menu when you are booting up to find out what the bad sectors are. You will find that in your Grub Menu when you boot your computer up if you have more than one operating system in the computer. If your Grub menu doesn’t show, try tapping your ‘esc’ key during boot-up, that should bring it up. Then press a down-arrow key to select memtest86+.

To set up Grub to tell the Linux kernel in Ubuntu MATE which are your bad ram sectors you need to boot Ubuntu MATE, (somehow if you can get it running with the faulty memory), and open your grub settings file,

gksudo pluma /etc/default/grub

edited by herman in response to malwaredpc’s advice in a later post.

This is what mine looks like, yours doesn’t have to be exactly the same as mine
Just look for the line that looks like this: "#GRUB_BADRAM=“0x01234567,0xfefefefe,0x89abcdef,0xefefefef”.
You will be wanting to delete the ‘comment’ (looks like: ‘#’ ), from the start of that line to enable that feature and you will need to replace the example sector numbers given there with your own actual results reported by memtest86+.

[code]# If you change this file, run ‘update-grub’ afterwards to update

/boot/grub/grub.cfg.

For full documentation of the options in this file, see:

info -f grub -n ‘Simple configuration’

GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=lsb_release -i -s 2> /dev/null || echo Debian
GRUB_CMDLINE_LINUX_DEFAULT=“quiet splash”
GRUB_CMDLINE_LINUX=“elevator=noop”

Uncomment to enable BadRAM filtering, modify to suit your needs

This works with Linux (no patch required) and with any kernel that obtains

the memory map information from GRUB (GNU Mach, kernel of FreeBSD …)

#GRUB_BADRAM=“0x01234567,0xfefefefe,0x89abcdef,0xefefefef”

Uncomment to disable graphical terminal (grub-pc only)

#GRUB_TERMINAL=console

The resolution used on graphical terminal

note that you can use only modes which your graphic card supports via VBE

you can see them in real GRUB with the command `vbeinfo’

#GRUB_GFXMODE=640x480

Uncomment if you don’t want GRUB to pass “root=UUID=xxx” parameter to Linux

#GRUB_DISABLE_LINUX_UUID=true

Uncomment to disable generation of recovery mode menu entries

#GRUB_DISABLE_RECOVERY=“true”

Uncomment to get a beep at grub start

#GRUB_INIT_TUNE=“480 440 1”[/code]

To make the changes in your grub configuration file effective, you will need to run one more command,

sudo update-grub

Now the next time you reboot your Ubuntu MATE should be avoiding those sectors of bad ram.

I have never needed to try this out myself so I’m just going by what I have been reading and hoping I’m right. I have a reasonable amount of experience with Gnu-Linux in general and with Gnu-Grub. This is what I would try first anyway. I hope it works out right for you on the first try.

You didn’t mention if you’re an experienced Gnu-Linux user new to Ubuntu MATE, or if you’re new from Windows and you need step-by-step instructions so I gave you half and half. If there are things you need explained in more detail please ask and I’ll elaborate even more. :slight_smile:

Good luck with it,
Regards from Herman

2 Likes

Alternatively, you can use a virtual terminal instead of using the DE as it uses more RAM and there0s more probability of using those bad cells. Run the following:
sudo nano /etc/default/grub

OR, you can use the Live CD/USB and open it thru, again, a VT but beware that your grub won’t be in /etc/default. You have to mount the storage device and use that mount point to grub’s config file.

Also, never use sudo with GUI aplicattions. The command from Herman must be:
gksudo pluma /etc/default/grub

ps: how do youknow the RAM is bad?

Okay then, sorry, try

gksudo pluma /etc/default/grub

I’ll go and edit the earlier post …

Thanks malwaredpc

YOU’RE VERY WELCOME :joy:

Hi Again, Herman and malwaredpc,

I appreciate your answers, I’m new from windows.
Windows have been showing “bluescreen” errors related to the ram. I can’t replace the ram because it is an onboard memory. I ran a test with the PassMark version of memtest86 (different to the memtest86+) because memtest86+ does not appears on the GRUB menu. I’ve been looking for a reason, and apparently is because i have a uefi system… Memtest86 results are:

Summary

Report Date 2016-08-19 14:51:52
Generated by MemTest86 V7.1 Free (64-bit)
Result FAIL
System Information

EFI Specifications 2.31
CPU Type AMD E1-6015 APU with Radeon R2 Graphics
CPU Clock 1397 MHz

Logical Processors 2

L1 Cache 2 x 64K (30999 MB/s)
L2 Cache 2 x 1024K (9403 MB/s)
L3 Cache N/A
Memory 2099M (2814 MB/s)
DIMM Slot #0 2GB DDR3 PC3-10600
Samsung / K4B4G1646Q-HYK0
1333 MHz
Result summary

Test Start Time 2016-08-19 08:07:08
Elapsed Time 2:41:50
Memory Range Tested 0x0 - 100000000 (4096MB)
CPU Selection Mode Single: CPU # 0

Tests Passed 46/48 (95%)

Lowest Error Address 0x186CCAE0 (390MB)
Highest Error Address 0x3A1856A8 (929MB)
Bits in Error Mask 000000000000FFFF
Bits in Error 16
Max Contiguous Errors 1
Test # Tests Passed Errors
Test 0 [Address test, walking ones, 1 CPU] 4/4 (100%) 0
Test 1 [Address test, own address, 1 CPU] 4/4 (100%) 0
Test 2 [Address test, own address] 4/4 (100%) 0
Test 3 [Moving inversions, ones & zeroes] 4/4 (100%) 0
Test 4 [Moving inversions, 8-bit pattern] 4/4 (100%) 0
Test 5 [Moving inversions, random pattern] 4/4 (100%) 0
Test 6 [Block move, 64-byte blocks] 2/4 (50%) 20
Test 7 [Moving inversions, 32-bit pattern] 4/4 (100%) 0
Test 8 [Random number sequence] 4/4 (100%) 0
Test 9 [Modulo 20, ones & zeros] 4/4 (100%) 0
Test 10 [Bit fade test, 2 patterns, 1 CPU] 4/4 (100%) 0
Test 13 [Hammer test] 4/4 (100%) 0
Last 10 Errors
[Data Error] Test: 6, CPU: 0, Address: 1A6CCAE8, Expected: FFFF0020, Actual: FFFFFFDF
[Data Error] Test: 6, CPU: 0, Address: 1A6CCAE0, Expected: 0000FFDF, Actual: 00000020
[Data Error] Test: 6, CPU: 0, Address: 1A6CCAD0, Expected: FFFF0020, Actual: FFFFFFDF
[Data Error] Test: 6, CPU: 0, Address: 1A6CCAC8, Expected: 0000E9DF, Actual: 00000020
[Data Error] Test: 6, CPU: 0, Address: 1A6CCAC0, Expected: 0000E920, Actual: 00000020
[Data Error] Test: 6, CPU: 0, Address: 186CCB08, Expected: FFFF0020, Actual: FFFFFFDF
[Data Error] Test: 6, CPU: 0, Address: 186CCB00, Expected: 0000FFDF, Actual: 00000020
[Data Error] Test: 6, CPU: 0, Address: 186CCAF0, Expected: FFFF0020, Actual: FFFFFFDF
[Data Error] Test: 6, CPU: 0, Address: 186CCAE8, Expected: 0000E9DF, Actual: 00000020
[Data Error] Test: 6, CPU: 0, Address: 186CCAE0, Expected: 0000E920, Actual: 00000020

I’m not sure if that is a badram pattern that i can use to set up grub. And I don’t know how to run memtest86+ instead of memtes86.

P.s. I’m not so good writing english, it is not my first language. hope you understand.

Actually it says “LAST 10 ERRORS”, so there are more. Try to follow this guide. Remember that a nibble is half of a byte.