Bug 2362821 - grub2 blscfg (almost) impossible to exclude bad RAM using memmap=
Summary: grub2 blscfg (almost) impossible to exclude bad RAM using memmap=
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: grub2
Version: 42
Hardware: x86_64
OS: Linux
low
medium
Target Milestone: ---
Assignee: Nicolas Frayer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 2102303 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2025-04-29 00:10 UTC by Trevor Hemsley
Modified: 2025-10-14 10:57 UTC (History)
7 users (show)

Fixed In Version: grub2-2.12-32.fc42 grub2-2.12-25.fc41
Clone Of:
Environment:
Last Closed: 2025-06-21 01:27:24 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Trevor Hemsley 2025-04-29 00:10:11 UTC
I have a Dell PowerEdge R630 in a remote data center with no access on which one of the 8 x 32GB DIMMs has gone bad. I need this machine back in operation and handily the linux kernel lets me do that by specifying `memmap=32g\$0x2000000000`. It appears impossible to enter this parameter using /etc/default/grub, all attempts end with it trying to pass `memmap=32g\` or `memmap=32g$`. This should be possible, blscfg should respect escape characters in parsing the command line. Non-BLSCFG grub2 understands and respects this format so this is a bug.

I say "almost" impossible because you can create e.g. /etc/tuned/exclude-ram/tuned.conf and have it inherit from your real chosen profile and append 

[bootloader]
cmdline = memmap=32g\\\$0x2000000000

then switch profiles to the exclude-ram. But this is a bit of a faff and really shouldn't be required.

Reproducible: Always

Steps to Reproduce:
1. attempt to append `memmap=32g\$0x2000000000` to a grub cmdline
2. watch it either kernel panic or attempt to boot in what appears to be about 32KB judging by the speed of the boot!
3.
Actual Results:
When I press 'e' to edit the selected kernel entry I see

memmap=32g\ or =32g or =32g$0x2000000000

Expected Results:
When I press 'e' to edit the selected kernel entry I should see

memmap=32g\$0x2000000000

at the end of the kernel command line not =32g\ or =32g or =32g$0x2000000000

Additional Information:
Not needed very often but when you need it, you need it.

Comment 1 Marta Lewandowska 2025-04-30 12:27:14 UTC
> Additional Information:
> Not needed very often but when you need it, you need it.

Loud and clear. You're not the first to complain about this, so we'll try to fix it relatively soon. Since you have a workaround, I'll set it as low priority, but we agree that this should work.

Comment 2 Leo Sandoval 2025-05-07 20:39:14 UTC
Trevor,

can you test this rawhide scratch on your setup? I tested on my rawhide VM and the issue is fixed with this change.

https://koji.fedoraproject.org/koji/taskinfo?taskID=132438594

Comment 3 Marta Lewandowska 2025-05-27 09:00:38 UTC
I reproduced this with grub2-2.12-28 as well as earlier versions, and tested that grub2-2.12-32.fc43 fixes this issue. I tested with BLSCFG set to true and false, and in both cases I see the parameter when I reboot:

[root@fedora ~]# cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-6.14.4-300.fc42.x86_64 root=UUID=a12b4bde-7967-494d-a16c-f9a726d78591 ro resume=UUID=8af6a969-1ad3-45a2-bcdb-410bbff562ef console=ttyS0 memmap=32g$0x2000000000

Comment 7 Fedora Update System 2025-06-17 16:56:39 UTC
FEDORA-2025-b0ae534a31 (grub2-2.12-32.fc42) has been submitted as an update to Fedora 42.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-b0ae534a31

Comment 8 Fedora Update System 2025-06-19 01:43:24 UTC
FEDORA-2025-b0ae534a31 has been pushed to the Fedora 42 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-b0ae534a31`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-b0ae534a31

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 9 Fedora Update System 2025-06-19 13:34:24 UTC
FEDORA-2025-eb145f3cb9 (grub2-2.12-25.fc41) has been submitted as an update to Fedora 41.
https://bodhi.fedoraproject.org/updates/FEDORA-2025-eb145f3cb9

Comment 10 Fedora Update System 2025-06-21 01:27:24 UTC
FEDORA-2025-b0ae534a31 (grub2-2.12-32.fc42) has been pushed to the Fedora 42 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 11 Fedora Update System 2025-06-21 02:24:08 UTC
FEDORA-2025-eb145f3cb9 has been pushed to the Fedora 41 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2025-eb145f3cb9`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2025-eb145f3cb9

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Fedora Update System 2025-06-24 01:05:03 UTC
FEDORA-2025-eb145f3cb9 (grub2-2.12-25.fc41) has been pushed to the Fedora 41 stable repository.
If problem still persists, please make note of it in this bug report.

Comment 13 Timothée Ravier 2025-08-29 09:53:35 UTC
*** Bug 2102303 has been marked as a duplicate of this bug. ***

Comment 14 Andy 2025-10-14 07:42:06 UTC
This bug still exist on Fedora Kinoite 42. I'm using grub 2.12.28.fc42 and uses `rpm-ostree kargs --editor` to add the memmap parameter (e.g. memmap=1M\$0xABCDEF). The dollar sign and the characters after it would always get consumed (tried triple slashes too, no difference).

I can't use this workaround https://bugzilla.redhat.com/show_bug.cgi?id=2102303#c5 because it seems that grubenv file length is limited to 1024 bytes max.

Comment 15 Marta Lewandowska 2025-10-14 10:57:21 UTC
(In reply to Andy from comment #14)
> This bug still exist on Fedora Kinoite 42. I'm using grub 2.12.28.fc42 and
> uses `rpm-ostree kargs --editor` to add the memmap parameter (e.g.
> memmap=1M\$0xABCDEF). The dollar sign and the characters after it would
> always get consumed (tried triple slashes too, no difference).
> 
> I can't use this workaround
> https://bugzilla.redhat.com/show_bug.cgi?id=2102303#c5 because it seems that
> grubenv file length is limited to 1024 bytes max.

The fix in f42 came in grub2-2.12-30.fc42, which got trash collected, so you need to update to grub2-2.12-32.fc42 to have this working.


Note You need to log in before you can comment on or make changes to this bug.