Grub out of memory?

hello, after the grub crisis happened haha i fixed the issue following this guide(before the update to it):

https://discovery.endeavouros.com/system-rescue/repair-a-non-booting-grub/2021/03/

here’s what i did:

  1. go into a live endeavouros environment
  2. $ sudo su
  3. mount the root
  4. # arch-chroot /path/to/root
  5. mount the efi
  6. # grub-mkconfig -o /boot/grub/grub.cfg
  7. # grub-install –target=x86_64-efi –efi-directory=/boot/efi –bootloader-id=EndeavourOS-grub
  8. # umount efi
  9. # exit
  10. umount /path/to/root
  11. reboot

after that i got the following message before booting in grub:

out of memory
out of memory
press enter to continue...

when pressing enter it will go to grub menu normally and my system is booting just fine
however after some searching i have found that the file system is corrupted and also my files too
in fact some files and applications won’t open at all

is there a way to fix the corruption on my files ?

If this is because of Grub… then…
I hope the experts give their point of view.
I am trying to convert from systemd-boot to rEFInd ( Converting to rEFInd from sytemd-boot ) as both seems to be simpler than Grub and rEFInd supports booting to snapshots.

apparently yes it’s because grub it happened exactly after i followed the guide and rebooted

I do not want to give advise that may make things worse with corrupted files.

Maybe if you are using BTRFS you can recover the files from a snapshot.

this command is the issuer in that case…
As it will create a new boot entry in your firmware but it do not set this to boot as default.
(another change happen with the grub update, only happen on some systems)
2022-08-29_10-43

Please read here:

1 Like

I’m hitting this issue too. I also only see a default grub screen and not the fancy endeavorOS grub screen during bootup. I haven’t noticed any corruption yet but I haven’t done much on my PC yet since fixing this issue.
However I only ran the grub-install command in chroot and not the extra long command.

Should I go back and run grub-mkconfig and grub-install with the added tags?

Same here, “out of memory”… “press any bla bla”

The system boot fine after pressing, but the message is annoying.

I was able to resolve this by removing the grub theme…
Simply commenting this line in /etc/default/grub

#GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt
save the config and rebuild grub.cfg:
sudo grub-mkconfig -o /boot/grub/grub.cfg

4 Likes

Yeah It’s the theme what makes this “out of memory” in new grub versions. Maybe they think that theming is bloat :rofl:

2 Likes

Tried this, but on my PC it just showed the Lenovo logo for much than normal and then went to a blank screen :frowning_face:

I had to go into the bios to get it to boot.

I have kind of fixed it with grub-install a few days ago, but that part of the boot seemed a bit slow after. Good news, looks like the new grub update from yesterday fixed it, now it boots how it used to.

This is another issue… or does it show the out of memory warning?

Yup. Worked here for me. I disabled the theme and now I have no longer the haning with “out of memory”.

1 Like

not sure as the update does nothing as showing a warning message, in addition, to the use of the same source state to get built.

1 Like

Yes, it shows the out of memory error twice. Nothing I do seems to get rid of it.

is it dualboot system ? dualbooting another OS from the same drive ?

EOS on first SSD. Manjaro, OpenSUSE and Debian on second SSD.

So EOS is all alone on one drive :wink:
i would check if it goes away when you disable os-probe running in your grub.cfg file but it could be also simple as you replaced the default eos /etc/default/grub with original package version.

you could post you one:
cat /etc/default/grub (if you do not want to show hardware IDs public you can send me in or remove it)

to disable os-prober running edit this line in the same file:

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=true

false to true … regen grub.cfg sudo grub-mkconfig -o /boot/grub/grub.cfg and reboot…

Thanks for your help. I followed your instructions but it still shows out of memory errors and now it only lists EOS as being available to boot.

This is my /etc/default/grub:

# GRUB boot loader configuration

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="EndeavourOS"
GRUB_CMDLINE_LINUX_DEFAULT="loglevel=3 nowatchdog nvme_load=YES"
GRUB_CMDLINE_LINUX=""

# Preload both GPT and MBR modules so that they are not missed
GRUB_PRELOAD_MODULES="part_gpt part_msdos"

# Uncomment to enable booting from LUKS encrypted devices
#GRUB_ENABLE_CRYPTODISK=y

# Set to 'countdown' or 'hidden' to change timeout behavior,
# press ESC key to display menu.
GRUB_TIMEOUT_STYLE=menu

# Uncomment to use basic console
GRUB_TERMINAL_INPUT=console

# Uncomment to disable graphical terminal
#GRUB_TERMINAL_OUTPUT=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=auto

# Uncomment to allow the kernel use the same resolution used by grub
GRUB_GFXPAYLOAD_LINUX=keep

# Uncomment if you want GRUB to pass to the Linux kernel the old parameter
# format "root=/dev/xxx" instead of "root=/dev/disk/by-uuid/xxx"
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
GRUB_DISABLE_RECOVERY=true

# Uncomment and set to the desired menu colors.  Used by normal and wallpaper
# modes only.  Entries specified as foreground/background.
#GRUB_COLOR_NORMAL="light-blue/black"
#GRUB_COLOR_HIGHLIGHT="light-cyan/blue"

# Uncomment one of them for the gfx desired, a image background or a gfxtheme
#GRUB_BACKGROUND="/path/to/wallpaper"
#GRUB_THEME="/path/to/gfxtheme"
GRUB_THEME=/boot/grub/themes/EndeavourOS/theme.txt

# Uncomment to get a beep at GRUB start
#GRUB_INIT_TUNE="480 440 1"

# Uncomment to make GRUB remember the last selection. This requires
# setting 'GRUB_DEFAULT=saved' above.
#GRUB_SAVEDEFAULT=true

# Uncomment to disable submenus in boot menu
GRUB_DISABLE_SUBMENU=y

# Probing for other operating systems is disabled for security reasons. Read
# documentation on GRUB_DISABLE_OS_PROBER, if still want to enable this
# functionality install os-prober and uncomment to detect and include other
# operating systems.
GRUB_DISABLE_OS_PROBER=true

so enable os-prober again and redo grub-mkconfig will bring other boot options back…
I had the double error with out of memory on one machine only and after removing both theme and os prober running it was not shown anymore…