Score:3

After Kernel Update, Error: Cannot Allocate Kernel Buffer, You need to load Kernel First

sx flag

I installed the 5.15.0-71 kernel on Ubuntu 22.04 LTS and rebooted my bare metal home server (Ryzen 7600). After reboot I received these two errors:

error: cannot allocate kernel buffer
error: you need to load the kernel first.

Press any key to continue..._ 

I am then sent to the grub selection screen. Trying to boot into Ubuntu repeats error message above.

The Details

  • I can boot into the 5.15.0-70 kernel from grub with no problem
  • I have updated Kernels before with no problem
  • I am able to load 5.15.0-71 after selecting it on grub many (10+) times in a row.

What I've Tried

  • I've disabled secure boot
  • I've reinstalled the new kernel

I've looked through the internet and found nothing describing my exact error (plenty of "you need to load kernel first." problems but none with "cannot allocate kernel buffer" also). I tried to find info on and understand the kernel buffer but my Ubuntu newbie brain couldn't understand what I found. I would appreciate any explanations or suggestions.

The-Fool avatar
sx flag
Mine is a Ryzen 7600. Added it to the post. Good to know this isn't just a me problem.
Matthew avatar
ru flag
I have also had this problem sporadically since 5.15.0-71 came out and I'm also using a Ryzen (3400G). This question made me realize it was a kernel issue not an SSD issue. I am going to open a bug report.
Matthew avatar
ru flag
@The-Fool I have now bug reported it here: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2017929. Please click the 'this bug affects me' button at the top. It would also be helpful if you can run `apport-collect -p linux BUG#2017929` in a terminal, which should allow you to add information about your system to the report. BTW were you using the 7600 internal graphics or a separate GPU?
Matthew avatar
ru flag
@mcin If you would like to see this fixed, please reproduce it on Ubuntu 22.04 and follow the instructions in my previous comment. Also, were you using the 3400G's internal graphics or a separate GPU?
The-Fool avatar
sx flag
@Matthew I am using the 7600 internal graphics. Thank you for submitting a bug report. I will follow through as soon as I finish work.
Matthew avatar
ru flag
@The-Fool: Correction to the terminal command, it's `apport-collect -p linux 2017929`
The-Fool avatar
sx flag
@Matthew Thank you for the correction. I've done both now.
Gotenks avatar
cn flag
Same issues here. --- MB: Gigabyte B650 AORUS ELITE AX (Firmware F5b) - CPU: AMD Ryzen 9 7900 12-Core Processor --- After a few tries / reboot it manages to boot with kernel 5.15.0-71-generic #78-Ubuntu.
Score:2
sx flag

So it turns out this is a bug with the 5.15.0-71 kernel probably involving Ryzen APUs. Thank you @Matthew for creating the bug report. If you are having the same problem please add your report here so that the underlying problem can be fixed. https://bugs.launchpad.net/ubuntu/+source/linux/+bug/2017929

The Workaround

From the linked bug report, the user rmgradient0 provided this series of steps that allow me to boot regularly:

sudo nano /etc/default/grub [I changed one line "GRUB_TIMEOUT=0" to "GRUB_TIMEOUT=5"]
sudo update-grub
sudo update-initramfs -uk 'all'
sudo shutdown -h now
David avatar
cn flag
There is not such thing as the latest kernel it can change and will change often. An actual kernel number you are referencing is needed.
Malady avatar
de flag
Didn't work for me, but maybe I just need a longer timeout... Does "sudo shutdown -h now" matter compared to the shutdown option in the start menu?
Malady avatar
de flag
What timeout style are you using / what's your whole grub file?
The-Fool avatar
sx flag
@Malady `GRUB_TIMEOUT_STYLE=hidden` Here's my whole Grub File If you need it: https://pastebin.com/vb3hHG7M
Malady avatar
de flag
You didn't turn Secure Boot (back?) on, did you? And are you (still) using integrated graphics? I'm using a Ryzen 3 2200g, but don't want to submit to Launchpad, because I don't want to make a new account.
The-Fool avatar
sx flag
Secure boot is still off and I’m still using integrated graphics.
Score:1
ec flag

Had the same problem with Xubuntu 22.04. Using the older kernel and then

sudo update-initramfs -uk 'all'

worked for me for the newer kernel too.

Malady avatar
de flag
Might it only be for Xubuntu? I'm on Ubuntu and it didn't work for me...?
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.