Flashes (Alerts)
Abstract
Real mode area (RMA) is a part of RAM which is used by GRUB2 for its operations and to load all the required boot components (Mods, drivers, initrd etc) for successful booting. The size of the RMA is negotiated from GRUB2 as well as from Linux kernel. The current size of the RMA is 512 MB. In most scenarios, the current RMA size is large enough to hold the Linux kernel, initramfs, Partition Firmware (PFW), GRUB2, and working memory for early Linux boot. However, there are some scenarios where GRUB2 memory usage might over run the 512 MB limit, and the logical partition might fail to boot while throwing an out of memory error.
If either the kernel image or the initramfs requires more than 95 MB, then GRUB2 might fail with an out of memory error when it attempts to load them. Generally, the default installed initramfs and vmlinux are well within the limits, but if Firmware Assisted Dump (FADump) is enabled in the system, the default initramfs size might increase and go beyond 95 MB and machine boot might end up in a GRUB memory issue.
A similar out of memory issue in GRUB2 might occur while doing an OS installation via DVD or vDVD. The OS installation via DVD or vDVD require more memory in RMA due to a larger initramfs size. This requirement of more memory in RMA leads to the out of memory issue. In addition, vTPM and Secure Boot when enabled also use memory in the RMA region, which results in higher memory usage in the RMA and in some scenarios, can lead to out of memory in GRUB2.
In the following scenarios the GRUB2 might run out of memory:
1. Secure boot and FADump are enabled together while booting.
2. DVD or vDVD is used for OS installation.
3. vTPM, secure boot, or both are enabled while doing OS installation.
Content
Red Hat Enterprise Linux (RHEL) 8.6
Red Hat Enterprise Linux 8.7
Red Hat Enterprise Linux 9.0
Red Hat Enterprise Linux 9.5
error: ../../grub-core/kern/mm.c:376:out of memory.
Press any key to continue...
- Disable secure boot in HMC.
- Disable vTPM in HMC.
- Restart the system from HMC.
- Edit the default grub boot entry in the boot screen.
- Edit the entry for initramfs to point to .initramfs-$kver.img.default instead of initramfs-$kver.img.
- Press Ctrl+x to boot the system.
- Revert grub core.elf in boot partition to the non-secure boot one:
$ dd if=/boot/grub2/powerpc-ieee1275/core.elf of=/dev/mapper/<PReP-boot-Partition-Name> - Restart the system from HMC.
- Restart system from HMC.
- Edit the default grub boot entry in the boot screen.
- Edit the entry for initramfs to point to .initramfs-$kver.img.default instead of initramfs-$kver.img.
- Remove "fadump=on" boot parameter in grub boot entry.
- Press Ctrl+x to boot the system.
- Use grubby to remove "fadump=on" parameter and update crashkernel parameter for kdump.
- Restart the kdump service.
- Reboot the system.
- Disable vTPM and secure boot.
- Power off the system from HMC.
- Disable vTPM in HMC.
- Disable secure boot in HMC.
- Reboot the system from HMC and restart the OS installation.
- Increase the LMB size to 1 GB or more (applicable only on Power10 systems).
- Login to HMC.
- Go to systems.
- Choose the machine.
- Click on the tab "Processor, Memory, and I/O".
- Expand the memory tab.
- For the option "Memory Region Size:" select 1 GB or more.
- Reboot the machine.
- An enhancement to GRUB2 is anticipated that will allocate more memory for the kernel and initramfs.
https://issues.redhat.com/browse/RHEL-54551 - Improve kexec scripts to avoid drastic increment in initramfs size when FADump is enabled.
https://bugzilla.redhat.com/show_bug.cgi?id=2139000
https://src.fedoraproject.org/rpms/kexec-tools/blob/main/f/fadump-howto.txt
Was this topic helpful?
Document Information
Modified date:
18 November 2024
UID
ibm16846531