1

I recently encountered some problems with my Dell XPS 13 running Ubuntu 17.10. I updated the linux kernel to the latest version. With the new kernel running, my wifi adapter wasn't working anymore. Also Virtualbox doesn't work anymore. I searched a lot on the internet but couldn't find any solution. I was told my only option would be to downgrade the kernel to the previous working version.

Now the problem with this is, I'll have to use GRUB. My laptop has been showing difficulties since some weeks, and one of them is that my laptop won't boot most of the times. The times it does boot, it goes straight to the disk encryption password prompt, meaning I can not boot from USB, enter bios or enter the GRUB.

Now my question is, is there any other way of downgrading the kernel without using GRUB? I have figured I might take out the SSD and try to fix it from another computer, but I don't have the necessary tools to open it up, and even if I did, I wouldn't know where to plug in a M.2 ssd.

6

If I understood your question correctly, your problem is that you cannot successfully access the BIOS setup nor the GRUB prompt at boot time because of other problems, and you need to downgrade your kernel version.

Since the package management tools usually won't let you uninstall the kernel version you're currently running, you'll need to somehow first boot an older kernel without interacting with GRUB at boot time.

That's easy.

First look at /etc/default/grub in your system and find the GRUB_DEFAULT= setting. If it says:

GRUB_DEFAULT=saved

then you can use the sudo grub-set-default <number> to change which of the configured boot options GRUB will pick by default. Normally, it will be the topmost entry, or entry number 0. So if you want to backtrack one kernel update, you'd usually just say sudo grub-set-default 1 and reboot, and then you'll be free to remove the latest kernel package you had problems with.

But if the /etc/default/grub instead says:

GRUB_DEFAULT=0

then you can edit that file to say GRUB_DEFAULT=1 instead, and then run sudo update-grub to make the change effective. Then reboot, and again, you should be able to remove the newest kernel you have currently installed since you'll no longer be running on it.

After removing the problematic kernel version, you should undo your bootloader change, or you'll forever be one step behind in kernel updates :-)

So, either run sudo grub-set-default 0 or edit /etc/default/grub again to undo your change + run sudo update-grub, depending on which you originally did.

  • The second answer was working for me, thank you so much! Now I can use my laptop normally again without having to connect my phone all the time as internet source. Thank you again! – Mad Tata Mar 26 '18 at 16:02
1

Grub 2 keeps a list of all installed kernels, unless you have disabled or removed the previous kernel(s). Use that list of previous kernels to boot into a working system, and then remove the kernel, as the other answer instructs. See How can I boot with an older kernel version?

0

If you can boot into your system at all, you can uninstall the latest kernel version. Kernels are packages. The following command will give you the list of the ones installed on your system:

dpkg -l | grep linux-image

The latest one will be the one of the form linux-image-<version number>-generic, with the highest version number. To remove it, issue the following as root:

apt remove linux-image-<version number>-generic

Finally, to update grub so it knows which kernel versions are available for booting, run the following as root:

update-grub

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.