You are not logged in.
Pages: 1
I have Jessie with the linux-image-amd64 meta package installed. Most of what I read about kernel upgrades seems to be around doing dist-upgrade. I'm a little confused as far as ongoing kernel upgrades that might occur within the same major version.
If (and I assume there are) occasional kernel upgrades available for Jessie, do they just get installed via api-get update and apt-get upgrade? If so, does it leave the existing kernel installed etc. Also...and this is probably related...does it automatically run grub-update if I'm using grub?
Thanks!
Tom
Offline
I have Jessie with the linux-image-amd64 meta package installed. Most of what I read about kernel upgrades seems to be around doing dist-upgrade. I'm a little confused as far as ongoing kernel upgrades that might occur within the same major version.
If (and I assume there are) occasional kernel upgrades available for Jessie, do they just get installed via api-get update and apt-get upgrade? If so, does it leave the existing kernel installed etc. Also...and this is probably related...does it automatically run grub-update if I'm using grub?
Thanks!
Tom
Hi Tom, when using jessie (current stable) you will get occasional kernel upgrades within the same family (3.16 LTS). If installing through Synaptic you can just mark it as a regular upgrade, it will install the new kernel (removing the old one) and will run update-grub (at least it did last time I checked). In other words it works the same as other upgradeable packages within the same major version (i.e. jessie/Devuan 1.0).
I have done quite a few in the last year and they all went very smoothly, no issues at all.
I don't use apt-get, but looks like it should work the same unless there are changing dependencies with new version (can't see that happening with the kernel but possible I guess)? In which case you might need to use apt-get dist-upgrade.
https://sourceforge.net/projects/vuu-do/
Vuu-do GNU/Linux, minimal Devuan-based openbox systems to build on, maximal versions if you prefer your linux fully-loaded.
Please donate to support Devuan and init freedom! https://devuan.org/os/donate
Offline
That's what I figured. I don't have Synaptic as this is a headless server. Thanks!
Tom
Offline
I believe it saves one older kernel - at least that's what it does for me. When a new kernel is installed, it will then save the current kernel and delete the previous saved kernel. So you always have one fallback.
- sgage
That's what I figured. I don't have Synaptic as this is a headless server. Thanks!
Tom
Offline
My jessie does not save older kernels - at least they're not listed at boot. I would like to know what grub file needs to be tweaked to tell grub to save 2 kernels. Used to be easy to do that with the old grub. This is not progress . . .
Online
#find how many linux images are installed on the system.
dpkg -l | grep linux-image
I use it for many years 3.16 series. Very pleased and I say to go up to end of LTS with it.
ii linux-image-3.16.0-4-686-pae 3.16.51-2 i386 Linux 3.16 for modern PCs
Tumbleweed - KDE Plasma (Wayland) - Breeze (LeafDark) [Qt]
♪Mahara★Japaaan!
Offline
My jessie does not save older kernels - at least they're not listed at boot. I would like to know what grub file needs to be tweaked to tell grub to save 2 kernels. Used to be easy to do that with the old grub. This is not progress . . .
I think I spoke too soon. I'm running ascii, upgraded from jessie. The upgrade left jessie's 3.16 kernel when it upgraded to 4.9, and I can boot either one from grub. Routine kernel updates don't work that way, I guess.
I agree - old grub was so much more understandable...
Last edited by sgage (2017-12-14 12:02:42)
Offline
I agree - old grub was so much more understandable...
Totally. Under Gentoo I moved to Syslinux when I saw how grub 2 worked. Not a fan.
Offline
I'm reviving an old topic here to clarify something regarding these kernel upgrades (within the same major version). Yesterday I upgraded my kernel on a Jessie install and here's what I ran into. I just wanted to make sure this is expected:
There was clearly a new kernel available for the linux-image-amd64 meta package. When I tried to get this via "apt-get upgrade" here's what I got:
apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
linux-image-amd64
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
What I finally figured out was that I could get the new kernel using this instead:
apt-get install --only-upgrade linux-image-amd64
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
linux-image-3.16.0-6-amd64
Suggested packages:
linux-doc-3.16 debian-kernel-handbook
The following NEW packages will be installed:
linux-image-3.16.0-6-amd64
The following packages will be upgraded:
linux-image-amd64
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 34.5 MB of archives.
After this operation, 168 MB of additional disk space will be used.
Do you want to continue? [Y/n]
That worked and appears to have run update-grub as well. When I rebooted I was running that new version. Apparently at that point if I wanted to remove the unused kernel, I could then do:
apt-get purge linux-image-3.16.0-5-amd64
update-grub
I'm assuming the "apt-get upgrade" may not work simply because upgrade implies installing the new version and removing the existing(?) which is obviously unsafe for kernels. Is that correct?
Thanks!
Tom
Offline
Normally you should use apt-get dist-upgrade. That would have upgraded to the newer kernel version automatically and of course remove the older one.
apt-get upgrade is not doing that. It never removes older packages. In this case I would say it is save to do so because it is a security update to an already existing package, here the kernel 3.16. And that is why you probably won't see the older kernel in Grub. Because it is still in the same family or meta package that is called linux-image-amd64.
Now if I install a kernel from backports it would be added as a new option to the Grub menu and it would install a new package instead of only upgrading the existing one. For Jessie that is kernel image 4.9.
I hope I explained it well. It can be confusing.
The system will take care of Grub. You do not have to do anything.
Offline
I was a bit confused as to what dist-upgrade does and was under the impression it did much more major updating than it does. I just tried that on a copy of the same VM I updated as per my last post. It did in fact install the updated kernel (related to the installed linux-image-amd64 meta package). Note however that it didn't automatically uninstall the old one as you described (and frankly I wouldn't want it to):
dpkg -l | grep linux-image
ii linux-image-3.16.0-5-amd64 3.16.51-3+deb8u1 amd64 Linux 3.16 for 64-bit PCs
ii linux-image-3.16.0-6-amd64 3.16.56-1+deb8u1 amd64 Linux 3.16 for 64-bit PCs
ii linux-image-amd64 3.16+63+deb8u2 amd64 Linux for 64-bit PCs (meta-package)
I'm not using backports or the like. I'm assuming that's why it just upgraded to a newer 3.16 kernel?
Thanks! I was somewhat mistaken as to what dist-upgrade does.
Tom
Offline
apt-get dist-upgrade installs the latest kernel from the repo, but it never removes an old one. It also reconfigures the GRUB to point to the new kernel (grub-update).
When you do that repeatedly, old kernels do accumulate in the /boot... directory; you can remove them using synaptic or apt-get remove (or purge).
There may be older kernel images, (and possibly kernel firmware and kernel header files) to remove. (linux-image-xxx, linux-header-xxx, etc). Just be precise when specifying the exact name (includes the version nomination) to not accidentally render your system unbootable. Synaptic helps you best, even a headless server can be managed that way (1. ssh -X -l adminxy;2. password;3. synaptic &). Just make sure your workstation is an X-server (Linux, Unix).
That is true for most of the .deb-based distros.
Last edited by Andre4freedom (2018-06-09 16:02:54)
Offline
Thanks! Yea that's what I thought. In our case these will always be headless servers in customer environments where X11Forwarding won't be an option. So the only means of cleaning up (which appears to only involve the unused linux-image-* packages in this case) would be with a careful apt-get purge.
Thanks for the replies. I was clearly misunderstanding dist-upgrade quite a bit.
Tom
Offline
Pages: 1