help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

grub says "out of memory" when loading a self built kernel


From: Aaron Lu
Subject: grub says "out of memory" when loading a self built kernel
Date: Wed, 26 Oct 2022 14:49:57 +0800

Hi,

When I use grub to boot my self built kernel, grub says "out of memory"
when it executes the "linux /boot/vmlinuz-my_built_kernel root=/dev/XXX"
line.

Initially I thought it is because vmlinuz-my_built_kernel is relatively
big: 15M, as compared to distro vmlinuz, 6-7M. But even after I shrink
the kernel image size down to 6M by dropping some config, use module
instead of builtin where possible and use XZ instead of gzip to compress
the kernel, grub still says the same thing.

The same 15M vmlinuz-my_built_kernel can boot on another bare metal
using the same distro system(thus same grub package used) and under a
VM that also runs the same distro, so it seems to be related to this
specific machine.

I also tried to use the distro's kernel config to build kernel and that
kernel can boot, so it appears to have something to do with kernel
config. I've checked the config about CONFIG_RELOCATABLE=y,
CONFIG_PHYSICAL_START=0x1000000 and CONFIG_PHYSICAL_ALIGN=0x200000, they
are all the same between my config and distro config.

Any ideas what can cause grub to say "out of memory" when loading
vmlinuz? Thanks!



reply via email to

[Prev in Thread] Current Thread [Next in Thread]