3

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.

  • 1
    Mine is a Ryzen 7600. Added it to the post. Good to know this isn't just a me problem. – The-Fool Apr 27 '23 at 03:14
  • 1
    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 Apr 27 '23 at 16:43
  • 1
    @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 Apr 27 '23 at 18:55
  • @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? – Matthew Apr 27 '23 at 18:56
  • 1
    @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. – The-Fool Apr 27 '23 at 19:02
  • 1
    @The-Fool: Correction to the terminal command, it's apport-collect -p linux 2017929 – Matthew Apr 27 '23 at 23:05
  • @Matthew Thank you for the correction. I've done both now. – The-Fool Apr 27 '23 at 23:52
  • 1
    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.

    – Gotenks Apr 28 '23 at 10:41
  • Have the same problem on a Lenovo 11e running Mint 21.2 with a Intel Celeron Chip. Tried the work around it did not work. I have secure boot off. What works, but not ideal, is that when booting up, I enter the BIOS screen and restart from there, and I get the Grub screen where it will boot from the new kernel after the set time out or upon hitting the enter key. So I think it has something to do with GRUB. – BobLuciano May 14 '23 at 14:14

2 Answers2

2

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
  • 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. – David May 03 '23 at 12:28
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community May 03 '23 at 12:28
  • 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 May 03 '23 at 15:23
  • What timeout style are you using / what's your whole grub file? – Malady May 03 '23 at 21:56
  • 1
    @Malady GRUB_TIMEOUT_STYLE=hidden Here's my whole Grub File If you need it: https://pastebin.com/vb3hHG7M – The-Fool May 03 '23 at 23:00
  • 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. – Malady May 04 '23 at 04:00
  • 1
    Secure boot is still off and I’m still using integrated graphics. – The-Fool May 04 '23 at 11:28
1

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.