Problem when updating Kernel to 5.3.1

David Jellyman

New Member
I have Ubuntu 18.04.3 LTS running on my desktop machine. I has run smoothly for a long time and I have been updating the Kernel using UKUU as appropriate. However, when I tried updating to 5.3.1 it reported installed with errors and on reboot attempt just gave me an error message as per IMG_20190925_074456.jpg attached.
I am able to boot using Grub menu to select 5.3.0 but when I try to update software using sudo apt update & sudo apt upgrade I get a further error message as per 2nd_error_message attached below. Any advice would be appreciated. Thank you.
IMG_20190925_074456.jpg
2nd_error_message.png
2nd_error_message.png
 


wizardfromoz

Super Moderator
Staff member
Gold Supporter
Sounds like a good Welsh name



(Wizard appears in a puff of smoke)

G'day David and welcome to linux.org from a Colonial DownUnder :)

UKUU is a Tony George product (teejeetech.in) who also makes Timeshift.

1. Is Ubuntu the only OS on the desktop or are you dualling with Windows and which version?

2. Given you can get in via the Grub Menu Advanced options to 5.3.0 - I would first of all go into Ubuntu that way and use UKUU to delete the offending kernel.

If UKUU does not update Grub, then

Code:
sudo update-grub
and then reboot and see how you go.

When you get a chance, read my thread on Timeshift here - you should take a full screenshot of your Linux before you modify kernel versions, then you can dial back if need be.

Gotta go for my Sunday night, cook dinner and watch the telly.

Back tomorrow

Chris Turner
wizardfromoz
 

poorguy

Well-Known Member
I have Ubuntu 18.04.3 LTS running on my desktop machine. I has run smoothly for a long time and I have been updating the Kernel using UKUU as appropriate. However, when I tried updating to 5.3.1 it reported installed with errors and on reboot attempt just gave me an error message as per IMG_20190925_074456.jpg attached.
I am able to boot using Grub menu to select 5.3.0 but when I try to update software using sudo apt update & sudo apt upgrade I get a further error message as per 2nd_error_message attached below. Any advice would be appreciated. Thank you.
Ubuntu will update the kernel on it's own so leave it be is best advice imo.
 

David Jellyman

New Member
Hi Chris, Have tried sudo update-grub but no change. Have tried reverting to older kernels but that does not seem to solve the issue .I don't understand why the system seems to only boot using kernel 5.3.0-0560300 any other kernel gives this same error. I don't really want to do a complete re-install as there is a lot on the machine but if that is the only way I will have to go that route. I do have a clone of the main system SSD but that also has the same fault. It means I can try anything without destroying my original anyway.
 

dos2unix

Active Member
Compiling the kernel is not a casual "lets upgrade my current OS" thing.
Almost every linux vendor has certain "plugins" that make it unique to that distro.
glibc, and other libraries have to match the kernel version you are compiling.
If all your libraries versions don't match, it will break almost everything else.

If you "really" want to do this, I would recommend doing it in a "chrooted" jail environment.
These instructions tell you how to do this.
http://www.linuxfromscratch.org/ But be warned, it takes a lot of downloading many packages
and can take a few days to complete (depending how fast your computer is)

Finally, I am wary of saying this on a "mostly Ubuntu" user space... but for me compiling
a kernel is much easier in a redhat/fedora environment. (Nothing against Ubuntu, I use it also)
But fedora has more tools, and the best thing is that the grub menus always let you roll back
to previous versions of the kernel, with Ubuntu, you have to hack the grub menu to do this.

Now it's possible you want to compile the kernel, just for the sake of doing it... but if not
and you just want a newer kernel, Fedora 30 is currently on 5.2.18.
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
Fedora 30 is currently on 5.2.18.
Likewise with Manjaro and other Arch-based Distros, my ArcoLInux is actually on 5.3.1

But David, the kernels you were trying to use are Mainline Kernels, and use of same is fraught with dangers

Before installing anything you should know that usually it's not a good idea to install a mainline kernel on your Ubuntu machine. These kernels are built from the latest Linux sources, without any Ubuntu patches or any other modifications, and are unsupported.

What's more, installing a kernel from the Mainline Kernel PPA usually breaks proprietary drivers or out-of-tree modules, like the proprietary Nvidia graphics drivers, Broadcom wireless drivers, VirtualBox dkms module, and so on. As a result, your computer may boot to a black screen, you may experience random freezes, and / or your WiFi may not be working after installing and booting to a mainline kernel.
Source https://www.linuxuprising.com/2018/10/2-utilities-to-install-latest-kernel-in.html

Do you need the latest and greatest for a good reason?

Q. Are you using the free UKUU or the paid version?

If paid, I would be asking Tony George for some support, at teejeetech.in

Other than that I would advocate using the kernel version that works to identify personal data you need, translate that to a safe spot, and then reinstall.

Then start using Timeshift.

Cheers all

Wizard
 

David Jellyman

New Member
Hi Wizard, I do not particularly wish to update my kernel further but the issue I have is that due to some error or corruption I am unable to update/upgrade my software using sudo apt. When I run sudo apt update it seems to go through and identify everything that has updates available but when I run sudo apt upgrade I get the message "The package linux-headers-5.1.21-050121 needs to be reinstalled, but I can't find an archive for it."
I think you arte correct that I am going to have to bite the bullet and save everything personal that I can in a safe location and then reinstall from scratch.
I actually think that I made a mistake when cleaning up earlier kernels that were on this machine but have not idea what that might have been.
Hey Ho we live and hopefully learn. I will in future rely on the LTS version of distribution and the Kernel included and remove UKUU from my machine unless it is specifically called for at a later date.
Many thanks for your time and help.
And I will take your recommendation and start using Timeshift properly.
 

JulienCC

Member
Hello there,

When I run sudo apt update it seems to go through and identify everything that has updates available but when I run sudo apt upgrade I get the message "The package linux-headers-5.1.21-050121 needs to be reinstalled, but I can't find an archive for it."
If it's the only problem left, you could force the removal of the packet. You will then be able to proceed with apt.
Code:
# dpkg --purge --force-all linux-headers-5.1.21-050121
But be carefull : if you are running on 5.1.21-050121 there's a chance that removing by force this package will remove the kernel too.
 

David Jellyman

New Member
Thanks Julien, Have managed to get it cleared up at last by installing the missing kernel bits using sudo ubuntu-mainline-kernel.sh 5.1.21 and then trying upgrade again. I kept using that command with each linux-header reported as needing to be reinstalled until the system stabilised.
Still will not update cleanly to 5.3.5 but I am happy now with 5.3
thanks to all who have responded with ideas. I now realised just how dangerous my little knowledge is.:)
 

wizardfromoz

Super Moderator
Staff member
Gold Supporter
David, that's good to hear. You are the driver behind the wheel to the vehicle that is your PC, and the choices are yours :)

Tony George DOES have an excellent product in Timeshift, my Thread is here

https://www.linux.org/threads/timeshift-similar-solutions-safeguard-recover-your-linux.15241/

If your system sustains a number of reboots and all is working fine, consider installing it and taking a full snapshot.

Code:
sudo add-apt-repository -y ppa:teejee2008/ppa
sudo apt-get update
sudo apt-get install timeshift
Icon will appear under Admin or System

@JulienCC - welcome to linux.org :)

It's great to see you helping out so much around the Forums, consider slipping over to

https://www.linux.org/forums/member-introductions.141/

... and telling us a little of the JulienCC story and meet a few of The Gang :)

Firday here in Oz, so enjoy your Linux and

Avagudweegend

Chris Turner
wizardfromoz

Edited - added BTW

BTW David, of course that invite to supply an Intro also applies to you of course, my bad :):(. Chris
 
Last edited:

Members online


Top