1. I have a laptop that has thousands of memory errors, making it impossible to even install ubuntu, there is always an error during installation.I was able to run a 4 pass memtest. which provided these results in order to make the machine usable.
edit and add /etc/default/grub:
GRUB_BADRAM="0x00000005A00C000,0xFFFFFFFFFFFFE000,0x00000005A00E000,0xFFFFFFFFFFFFF000,0x00000005C00C000,0xFFFFFFFFFFFFE000,0x00000005C00E000,0xFFFFFFFFFFFFF000"
then sudo update-grub
for windows bcdedit /set {badmemory} badmemorylist 0x5A00C 0x5A00D 0x5A00E 0x5C00C 0x5C00D 0x5C00E
2. My idea was to install ubuntu on a perfectly fine machine on an ssd, modify grub with that new line using sudo nautilus, and then do a sudo update-grub. then take out the ssd and insert it on the broken laptop. I did all that, but the Computer that is perfectly fine and has no errors refused to boot after that GRUB_BADRAM= line addition. it never boots and gives no menu at al.
3. I took a look at How do I tell ubuntu not to use certain memory addresses?
where someone did a comment about using memmap instead of GRUB_BADRAM, but the solution i get from Memtest is different from what the user explained, for example my memtest results have many more characters on the first address 0x00000005A00C000 and i don´t know how to convert it as a valid memmap line or memmap lines in order to tell ubuntu NOT to use those areas
does anyone know how could i fix this? GRUB_BADRAM was supposed to be an easy fix but i have no idea why the machine does not boot with that added, and i would like to try the memmap method to see if i can at least use the laptop.
thanks
Update -- FIXED !!
I have edited the grub file now thanks to the comments provided, with the following format ( i hope i have the correct format)
GRUB_DEFAULT=0
GRUB_TIMEOUT_STYLE=hidden
GRUB_TIMEOUT=0
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash memmap=8K\\\$0x00000005A00C000,4K\\\$0x00000005A00E000,8K\\\$0x00000005C00C000,4K\\\$0x00000005C00E000"
GRUB_CMDLINE_LINUX=""
THEN: SUDO UPDATE-GRUB
The computer accepted it and i was able to boot into ubuntu., so i went to /proc/iomem and opened, it, and i saw reserved records for 00000005A00C000 and 00000005A00E000 and 00000005C00C000 and 00000005C00E000
Now the laptop has the hard drive in it, i could boot UBUNTU! i will test it for hours watching youtube and web browsing
THANK YOU VERY MUCH FOR THE HELP! YOU JUST SAVED A RYZEN LAPTOP WITH IPS DISPLAY AND NOW IT IS BACK TO LIFE
UPDATE#2 i would like if someone can double check this calculation
:
NOW THAT I HAVE KIND OF MASTERED THE CALCULATION, I WOULD LIKE SOMEONE TO TELL ME IF THIS IS CORRECT.
a memtest bad memory like this one that ends with FFC000:
0x0000000B4018000,0xFFFFFFFFFFFFC000
1)You take the mask FFC000 and flip all the bits in FFC000 to FFFFFF
2)This gives us the FFFC000 ^ FFFFFF = 003fff in decimal 3fff is 16383 bytes of bad ram.
3)I round up to the next power of 2, which is 16384 bytes of bad ram.
4)so the value for memmap would be 16K$0x0000000B4018000
im i correct? those 16k get multiplied by 1024, and that is how you get 16384
UPDATE #3
- I learned the hard way, while using ubuntu and suddently tabs started to crash, etc. because i expanded the memory with a another sodimm stick added.
so i fired up another memtest86 scan, the new report shows the new faulty addresses and im fixing that since i got all the information i need now.
HOWEVER.
when i look at the memtest86 html report i see also 2 things on that report listed.
Lowest Error Address 0xB2018170 (2848MB)
Highest Error Address 0xB401C648 (2880MB)
Does this mean that my ram is faulty from 2848MB to 2880MB ?
instead of using all the calculated code, isn´t it better to use something more simple like memmap=100M$2800M ( This will blacklist 100M after the 2800M address i rounded up in order to try not to use near that broken area as much as possible)
Once you run the memmap in ubuntu. How do you double check that there are no more memory errors in ubuntu? since if you run memtest again it will scan the full memory again and give the errors that we fixed
thanks
GRUB_BADRAM
line in /etc/default/grub affected /boot/grub/grub.cfg?