Grub2 Error Out of Memory
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
linux (Ubuntu) |
Incomplete
|
Undecided
|
Unassigned |
Bug Description
I had the grub "error: out of memory" issue after upgrading Ubuntu to 22.04 from 21.10. I used a Live USB of Ubuntu to chroot into my system and after many trials and failures, I could get past the issue by changing line 36 in /etc/initramfs-
#
# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz | zstd ]
#
COMPRESS=zstd
However, this was still not a fix as zstd provided a quicker boot previously than any other but was failing now. Yet from there it seemed it was a compression issue. Changed it back to zstd and went to another fix.
I further learned that zstd had defaulted to a lower compression value in /usr/sbin/
zstd) compress="zstd -q -19 -T0" ;;
Instead of
zstd) compress="zstd -q -1 -T0" ;;
Problem solved from proper chroot and updating grub2 after changing line 196 of /usr/sbin/
Also made comment to Bug #1842320.
This bug is missing log files that will aid in diagnosing the problem. While running an Ubuntu kernel (not a mainline or third-party kernel) please enter the following command in a terminal window:
apport-collect 1970894
and then change the status of the bug to 'Confirmed'.
If, due to the nature of the issue you have encountered, you are unable to run this command, please add a comment stating that fact and change the bug status to 'Confirmed'.
This change has been made by an automated script, maintained by the Ubuntu Kernel Team.