I have bad ram which is soldered on so I can't replace it. I have run memtest86+ and got the output in badram format. I added this to the current kernel with:
sudo grubby --args=badram=0x0000000050d54a08,0xfffffffff7fffadc --update-kernel /boot/vmlinuz-5.9.8-200.fc33.x86_64
I can see from dmesg that the parameter is there but nothing seems to be happening. I was expecting that area of ram to show up in the logs somewhere:
[ 0.000000] microcode: microcode updated early to revision 0x2f, date = 2019-11-12
[ 0.000000] Linux version 5.9.8-200.fc33.x86_64 ([email protected]) (gcc (GCC) 10.2.1 20201016 (Red Hat 10.2.1-6), GNU ld version 2.35-14.fc33) #1 SMP Tue Nov 10 21:58:19 UTC 2020
[ 0.000000] Command line: BOOT_IMAGE=(hd0,msdos1)/vmlinuz-5.9.8-200.fc33.x86_64 root=/dev/mapper/fedora-root ro resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet systemd.unified_cgroup_hierarchy=0 badram=0x0000000050d54a08,0xfffffffff7fffadc
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: Enabled xstate features 0x7, context size is 832 bytes, using 'standard' format.
[ 0.000000] BIOS-provided physical RAM map:
[ 0.000000] BIOS-e820: [mem 0x0000000000000000-0x000000000009cfff] usable
[ 0.000000] BIOS-e820: [mem 0x000000000009d000-0x000000000009ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000000e0000-0x00000000000fffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000000100000-0x000000000fffffff] usable
[ 0.000000] BIOS-e820: [mem 0x0000000010000000-0x000000001000afff] reserved
[ 0.000000] BIOS-e820: [mem 0x000000001000b000-0x000000009e0a6fff] usable
[ 0.000000] BIOS-e820: [mem 0x000000009e0a7000-0x00000000acbfefff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000acbff000-0x00000000acd7efff] ACPI NVS
[ 0.000000] BIOS-e820: [mem 0x00000000acd7f000-0x00000000acdfefff] ACPI data
[ 0.000000] BIOS-e820: [mem 0x00000000acdff000-0x00000000afffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000f8000000-0x00000000fbffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fec00000-0x00000000fec00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed08000-0x00000000fed08fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed10000-0x00000000fed19fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fed1c000-0x00000000fed1ffff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000fee00000-0x00000000fee00fff] reserved
[ 0.000000] BIOS-e820: [mem 0x00000000ffa00000-0x00000000ffffffff] reserved
[ 0.000000] BIOS-e820: [mem 0x0000000100000000-0x000000024dffffff] usable
I have also tried 32-bit addresses but it's the same. I have also searched for 'mem', 'bad' etc and not found anything. Unfortunately I only get errors from the bad ram every few days so can't know if it's working yet.
The actual output from memtest86+ is:
0x50d54a08,0xf7fffadc,0x50d54a88,0xf7fffe9c,0x50d54c08,0xf7fffe9c,0x50d54c48,0xf7fffd5c,0x50d54c88,0xfffffcbc,0x50d54848,0xfffff8fc,0x50d54988,0xf7fffb9c,0x50d55008,0xf7fffc1c,0x58d54828,0xfffff83c,0x58d54908,0xffffff18
I also tried adding memtest=1
parameter to get the kernel to run it's own test but this was also ignored.
memmap=nn[KMG]$ss[KMG]
(mark region as reserved) ormemtest=n
(test all ram n times and auto reserve bad detect regions). good luck!memtest=1
does not work, try larger number, for examplememtest=10
(multiple passes with multiple patterns, more likely to detect) then checkdmesg
that it actually ran the memtest: paste.ubuntu.com/p/cKb5vFyVDX - of course, in my case, there is no bad ram to find...memmap
is working but only if I edit the command line in grub myself before booting - I can't pass it through properly in /etc/grub/default because the$
gets removed. I have tried escaping, double escaping, quoting, everything. I think it's the$0
it's seeing, so maybe I have to format the address as KMG instead. What is 0x50d5000 in k? Sorry!$0
as\\\$0
(assuming it's inside double quotes in the /etc/default/grub file). This is because the shell eats one layer of escape, and grub itself also eats one (allows $variables in grub.cfg) so you need two. Escape $0 once is \$0, escape twice is \\\$0. Checkcat /proc/cmdline
to see the literal string that was passed to kernel.