3

I use Kubuntu for years on my XPS13 without trouble, but with kernel update 5.15.0-60, it couldn't boot anymore. I updated today to kernel 5.15.0-67 and it still can't boot... I can only boot on previous 5.15.0-58 version.

My computer is a dell XPS13 9380, Kubuntu 22.04. When booting on new kernels, after grub select, I got a black screen.

journalctl -b -1 can only show boots on 5.15.0-58 : any attempt on 5.15.0-60 nor 5.15.0-67 doesn't appear with this command.

I have to say that this troubles started pretty soon after I had a memory problem : my / partition was full and after I rebooted for update installs, I got a message "erreur mémoire épuisée", which means in french "error memory exhausted" or something like that. So I had to launch an live USB drive, free some space and run a "boot repair", which succeeded but it had put ubuntu 20.04, detected on another partition, as default (strange). Anyway, I still can launch 22.04 but only with 5.15.0-58 kernel.

I don't know if the problem is from grub (as no boot seems to occur) or from newest kernels.

Thanks for any advice to find out what prevent new kernels to boot ! Marc

Marc
  • 41
  • Hmmm, interesting, I'm having the same problem, also with a Dell XPS 13 9380, on Ubuntu 22.04.2, the English error message is "out of memory". For me the problem occurred after updating from 5.15.0-60 to 5.15.0-67, with 5.15.0-60 still working and 5.15.0-67 showing the error. So you had the problem with kernel 5.15.0-60, but I don't, which leads me to believe that indeed it's not really a problem with the kernel, but with the grub config, as you suggest in your answer. – ValarDohaeris Mar 10 '23 at 11:06
  • 1
    Probably this "out of memory" bug had no relationship with the fact my partition was almost full at the time of this bug (otherwise, kernel 58 would had the same problem). Several grub updates have occurred last weeks if I'm not wrong. This may be the cause. If you run boot-repair and have multiple boot, take care to choose the right default OS in the options. – Marc Mar 11 '23 at 12:54

2 Answers2

1

In the end I could manage with this problem, which was (as far as I understand) a grub problem more than a kernel problem.

I tried to reinstall grub (update-grub and grub-install), and then could not boot anymore on kubuntu 22.04, with this naughty message like "memory exhausted", on any kernel...

I ran a boot-repair once again on a live kubuntu and found option to launch kubuntu 22 as default. After boot-repair, kubuntu 22 with last kernel (5.15.0-67) works like a charm.

Have fun ! Marc

Marc
  • 41
0

I had the same problem after updating to kernel 5.15.0-67, ignored it for a while because I could still boot with 5.15.0-60, but when I got another kernel update which installed 5.15.0-69, for some reason 5.15.0-60 couldn't boot anymore either, so my laptop was bricked and I had to fix it from an Ubuntu Live USB stick. Unfortunately boot-repair did not work for me, when I ran it from a Ubuntu Live USB stick, it did not have any "suggested repairs".

Screenshot of the issue

From reading this bug tracker comment, I believe this is the explanation for the "out of memory" error:

Grub attempts to read the initrd into a memory location that is too small.

This issue is caused by a combination of several factors:

  • Grub not setting aside enough space for the initrd in memory and not at the right location,
  • Initrds having grown due to holding more modules and more firmware. This is especially the case with the nvidia proprietary driver.
  • Typical screen resolutions and their associated buffers in memory having increased.

Note that the comment linked above also provides some ideas for workarounds. I will provide a full summary of the steps that fixed it for me in the hope this is useful for someone else.

The solution was found by piecing together several other Stack Overflow answers which are referenced in every step.

System setup

I have a Dell XPS 13 9380 laptop running Ubuntu 22.04.2 (upgraded from 20.04 which was originally installed some time in 2020).

The steps assume that your setup is similar to mine, namely:

  • Your hard drive is connected through an NVM Express port and therefore the partitions are named nvme0n1p1, nvme0n1p2, nvme0n1p3
  • You are using LUKS disk encryption

Steps to fix

Mount encrypted LUKS partition

sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1p3_crypt

See Mounting encrypted LUKS partition from Live CD.

Mount stuff in /mnt and chroot

This is required as a preparation step, so that changes can be applied to the system on disk, rather than to the Live boot system.

sudo mount /dev/ubuntu-vg/root /mnt/
sudo mount --bind /dev /mnt/dev
sudo mount --bind /dev/pts /mnt/dev/pts
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
sudo mount /dev/nvme0n1p2 /mnt/boot
sudo mount /dev/nvme0n1p1 /mnt/boot/efi
sudo chroot /mnt

See

Change initramfs.conf and update-initramfs/grub

Edit /etc/initramfs-tools/initramfs.conf and set these 2 options (or just 1 of the 2, see below for more information):

MODULES=dep
COMPRESS=xz

Then run the following:

sudo update-initramfs -c -k all
sudo update-grub

Which initramfs.conf change actually fixes it?

On the Ubuntu bug tracker, #1970402, the reporter mentions:

After upgrading to 22.04 system is unbootable because of "out of memory" error when loading initial ramdisk. I was able to fix it by editing /etc/initramfs-tools/initramfs.conf and changing configuration to:

MODULES=dep
COMPRESS=xz
RUNSIZE=15%

Not sure which one helped, but I can test it if needed.

Well, I tested, and these are the results in my case:

  • Setting MODULES=dep (instead of default MODULES=most) fixes the issue
  • Setting COMPRESS=xz (instead of default COMPRESS=zstd) fixes the issue
  • Setting both MODULES=dep and COMPRESS=xz fixes the issue
  • Setting RUNSIZE=20% (instead of default RUNSIZE=10%) does not fix the issue