You are not logged in.

#1 2024-11-26 21:04:50

TheGreatAndyChow
Member
Registered: 2018-05-26
Posts: 7

How to blacklist memory page using systemd-boot?

I have a stick of ECC RAM that consistently produces a recoverable error at the same address:

EDAC MC0: 1 CE on mc#0csrow#3channel#1 (csrow:3 channel:1 page:0x1f75764 offset:0x9c0 grain:64 syndrome:0x2

I have seen guides (most over a decade old) that specify either passing a kernel parameter in grub, with memtest86, or memmap. I use systemd-boot. I'm also not even sure the kernel parameter they pass is still correct.

How can I blacklist that memory page? It's a 32GB stick so I don't want to remove it, and I can't afford another one now. Also, blacklisting bad ram page is something that has to be done for people with soldered RAM.

An example I read said to modify the entries in /boot/loader/entries/ that would look like:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=1234-5678 rw quiet memmap=64K$1.25G

but I don't have any files in /boot/loader/entries/ . I used archinstall and the defaults. I'd rather stick with systemd-boot and not add too much stuff.

Any help appreciated.

Offline

#2 2024-11-26 23:37:37

cryptearth
Member
Registered: 2024-02-03
Posts: 1,087

Re: How to blacklist memory page using systemd-boot?

TheGreatAndyChow wrote:

I used archinstall

and problems like the one you posted are why archinstall is not the noob way but rather for experienced users familiar with the manual setup and the several specifics about the options selected
if you don't understand where archinstall placed the files for systemd-boot you should rather restart by reading the manual guide https://wiki.archlinux.org/title/Installation_guide and maybe even do it actually several times with different configurations to get familiar with how archinstall does systemd-boot install and where to look for the files you're supposed to modify

sorry for being a bit sarcastic - but it's pretty much the same as with "no backup? no pity!" - or transformed to what happend to you: "not bothered to do the manual setup but thought getting away with archinstall? suffer the consequences!"

also: that ram is bad - replace it asap

Offline

#3 2024-11-27 05:48:53

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,488
Website

Re: How to blacklist memory page using systemd-boot?

TheGreatAndyChow wrote:

I don't have any files in /boot/loader/entries/

The path will be relative to the EFI system partition so use `lsblk -f` to see where that is mounted (or share the output here).

TheGreatAndyChow wrote:

I used archinstall

Please share the install log here. Thanks.


Para todos todo, para nosotros nada

Online

#4 2024-11-27 17:02:52

TheGreatAndyChow
Member
Registered: 2018-05-26
Posts: 7

Re: How to blacklist memory page using systemd-boot?

Head_on_a_Stick wrote:
TheGreatAndyChow wrote:

I don't have any files in /boot/loader/entries/

The path will be relative to the EFI system partition so use `lsblk -f` to see where that is mounted (or share the output here).

It's not in the /boot drive, that's what I was saying. I have a
nvme0n1                                                                             
├─nvme0n1p1 vfat     FAT32                          /boot

partition which is mounted and fine. But there's nothing in the boot/loader/entries/

I'm guessing it's in the esp UEFI firmware on my motherboard, but I don't know how to mount that. It doesn't appear with lsblk.

TheGreatAndyChow wrote:

I used archinstall

Please share the install log here. Thanks.

https://pastebin.com/5tv4zvqN

I replaced the UUIDs, and it's the chunk you likely want to see.

Offline

#5 2024-11-27 17:16:18

TheGreatAndyChow
Member
Registered: 2018-05-26
Posts: 7

Re: How to blacklist memory page using systemd-boot?

cryptearth wrote:
TheGreatAndyChow wrote:

I used archinstall

and problems like the one you posted are why archinstall is not the noob way but rather for experienced users familiar with the manual setup and the several specifics about the options selected
if you don't understand where archinstall placed the files for systemd-boot you should rather restart by reading the manual guide https://wiki.archlinux.org/title/Installation_guide and maybe even do it actually several times with different configurations to get familiar with how archinstall does systemd-boot install and where to look for the files you're supposed to modify

sorry for being a bit sarcastic - but it's pretty much the same as with "no backup? no pity!" - or transformed to what happend to you: "not bothered to do the manual setup but thought getting away with archinstall? suffer the consequences!"

also: that ram is bad - replace it asap

The RAM is ECC and has corrected all errors so far. Sure, there is risk that a second flip happens on the affected page, but statistically that's extremely unlikely (the cosmic ray would have to hit that page, 64k out of 32 GB). Until I figure out how to blacklist that page, it just means that that part of the stick acts like regular non-ECC RAM.

Also,
9buid0.jpg

Offline

#6 2024-11-27 17:58:19

cryptearth
Member
Registered: 2024-02-03
Posts: 1,087

Re: How to blacklist memory page using systemd-boot?

well, the fact that you replace a complete random 128-bit uuid because you may think anybody could do anything with it ... nvm
that log look somewhat short - anyway, it gives a hint where to start however - the wiki will guide you further along

Offline

#7 2024-11-27 18:00:58

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,488
Website

Re: How to blacklist memory page using systemd-boot?

TheGreatAndyChow wrote:

there's nothing in the boot/loader/entries/

So what is on the ESP, exactly?

This will show the contents:

find /boot
TheGreatAndyChow wrote:

I'm guessing it's in the esp UEFI firmware on my motherboard

That's not how systemd-boot works, it should need loader entries on the ESP.

The archinstall log certainly shows /boot/ mounted under the ESP and systemd-boot is used. What do you actually see when the machine starts? Is there a menu?


Para todos todo, para nosotros nada

Online

#8 2024-11-27 22:51:26

TheGreatAndyChow
Member
Registered: 2018-05-26
Posts: 7

Re: How to blacklist memory page using systemd-boot?

Ok, I found out where the params are with bootctl. I can also update the esp with that. However, still no ideas how to modify the options of an entry. I see no examples or commands that allow editing the entries. Same with efibootmgr. Anyone familiar with how to edit? And where are they stored? Are they in the .efi files themselves? And if so, is there a way I can add a hook so when I update the new kernel won't squish it? Preferably without going a dkms way.

UUIDs redacted to 3 characters because they are irrelevant.

bootctl list
         type: Boot Loader Specification Type #2 (.efi)
        title: Arch Linux (6.12.1-arch1-1) (default) (selected)
           id: arch-linux.efi
       source: /boot//EFI/Linux/arch-linux.efi
     sort-key: arch
      version: 6.12.1-arch1-1
        linux: /boot//EFI/Linux/arch-linux.efi
      options: root=PARTUUID=f58 zswap.enabled=0 rootflags=subvol=@ rw rootfstype=bt>

         type: Boot Loader Specification Type #2 (.efi)
        title: Arch Linux (6.12.1-arch1-1~fallback)
           id: arch-linux-fallback.efi
       source: /boot//EFI/Linux/arch-linux-fallback.efi
     sort-key: arch
      version: 6.12.1-arch1-1~fallback
        linux: /boot//EFI/Linux/arch-linux-fallback.efi
      options: root=PARTUUID=f58 zswap.enabled=0 rootflags=subvol=@ rw rootfstype=bt>

         type: Automatic
        title: Reboot Into Firmware Interface
           id: auto-reboot-to-firmware-setup
       source: /sys/firmware/efi/efivars/LoaderEntries-4a6

Offline

#9 2024-11-28 01:03:10

cryptearth
Member
Registered: 2024-02-03
Posts: 1,087

Re: How to blacklist memory page using systemd-boot?

please use code-tags for posting console output
and as you already discovered bootctl just run it without any additional options

sudo bootctl

it will list the required information

Offline

#10 2024-11-28 05:48:44

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 8,488
Website

Re: How to blacklist memory page using systemd-boot?

Well thanks for answering my questions OP, that's very helpful of you.

Looks like you're using unified kernel images so check /etc/kernel/cmdline.


Para todos todo, para nosotros nada

Online

#11 2024-12-01 14:16:11

ReDress
Member
Registered: 2024-11-30
Posts: 58

Re: How to blacklist memory page using systemd-boot?

TheGreatAndyChow wrote:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=1234-5678 rw quiet memmap=64K$1.25G

but I don't have any files in /boot/loader/entries/ . I used archinstall and the defaults. I'd rather stick with systemd-boot and not add too much stuff.

For what it's worth, what you're doing is not really blacklisting. In this context is probably is and it is long since having done something of this sort but this probably just requested the kernel not to use that region of memory.

The region, can for instance be later used by device, for instance an IOMMU for page tables.

Offline

#12 2024-12-01 14:18:41

ReDress
Member
Registered: 2024-11-30
Posts: 58

Re: How to blacklist memory page using systemd-boot?

TheGreatAndyChow wrote:

title Arch Linux
linux /vmlinuz-linux
initrd /initramfs-linux.img
options root=UUID=1234-5678 rw quiet memmap=64K$1.25G

but I don't have any files in /boot/loader/entries/ . I used archinstall and the defaults. I'd rather stick with systemd-boot and not add too much stuff.

For what it's worth, what you're doing is not really blacklisting. In this context it probably is and it is long since having done something of this sort but this probably just requested the kernel not to use that region of memory.

The region, can for instance be later used by device, for instance an IOMMU for page tables.

In other words, you reserved the memory?

Offline

#13 2024-12-01 16:17:10

loqs
Member
Registered: 2014-03-06
Posts: 18,130

Re: How to blacklist memory page using systemd-boot?

ReDress wrote:

For what it's worth, what you're doing is not really blacklisting. In this context is probably is and it is long since having done something of this sort but this probably just requested the kernel not to use that region of memory.

The region, can for instance be later used by device, for instance an IOMMU for page tables.

Are you suggesting using a different e820 type?

Offline

#14 2024-12-01 17:09:17

ReDress
Member
Registered: 2024-11-30
Posts: 58

Re: How to blacklist memory page using systemd-boot?

loqs wrote:
ReDress wrote:

For what it's worth, what you're doing is not really blacklisting. In this context is probably is and it is long since having done something of this sort but this probably just requested the kernel not to use that region of memory.

The region, can for instance be later used by device, for instance an IOMMU for page tables.

Are you suggesting using a different e820 type?

Yes, this is probably what it is boiling down to.

If you look at ARM board configs in the kernel, some, if not all, have configs for memory reserving because, presumably,  the devices make hard access to these regions and they cannot be otherwise used.

Offline

Board footer

Powered by FluxBB