7

20.04.2 on ThinkPad X1 C7:

An update eaves me unable to complete the startup. I end up with initramfs command line, with "gave up waiting for root device" and "/dev/mapper/ubuntu-vg-root doesn't exist" information.

Loading the previous kernel -- 5.8.0-50 from GRUB, which shows 5.8.0-53 as the newest -- seems to be working. But I'm not sure how to remove the newer kernel. Grateful for any help on this.

Thanks.

1 Answer 1

17

The following steps will remove a given kernel along with its drivers drivers, and lets the package manager know that you don’t want it again if you do an update. You should remove the specific broken kernel and it’s headers, don’t remove the super package linux-generic this is the package that Ubuntu uses to upgrade the kernel and headers when they become available. If you remove it you wont get kernel updates automatically and will have to specifically run apt-get to get them.

  1. Open Terminal (if it’s not already open)
  2. List the available kernels:
    dpkg -l | grep linux-image
    
  3. Remove the kernel(s) you don’t want:
    sudo apt-get purge linux-image-5.8.0-53-generic
    
  4. Remove the headers as well:
    sudo apt-get purge linux-headers-5.8.0-53-generic
    
  5. Reboot

On reboot, hold Shift down during boot and confirm that the broken kernel is not a choice in the grub advanced settings.

Because you haven't removed the linux-generic package itself, Ubuntu will still attempt to get a new kernel when one is available, just not the one you specifically purged.

Thats all there is to it 👍🏻

2
  • I am confused. I thought 20.04.2 lts has 5.4...
    – Sharun
    May 15, 2021 at 7:15
  • Many thanks for this -- May 15, 2021 at 8:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .