today the software updater in Ubuntu 20.04 prompted me to do the "partial upgrade" for newest kernel upgrade.
My current kernel is 5.13.0-39-generic. The partial upgrade wants to install the following:
linux-headers-5.13.0-40-generic
linux-hwe-5.13-headers-5.13.0-40
linux-image-5.13.0-40-generic
linux-modules-5.13.0-40-generic
linux-modules-extra-5.13.0-40-generic
linux-modules-nvidia-390-5.13.0-40-generic
linux-objects-nvidia-390-5.13.0-40-generic
linux-signatures-nvidia-5.13.0-40-generic
It wants to upgrade the following:
libnvidia-cfg1-390
libnvidia-common-390
libnvidia-compute-390
libnvidia-compute-390:i386
libnvidia-decode-390
libnvidia-decode-390:i386
libnvidia-encode-390
libnvidia-encode-390:i386
libnvidia-fbc1-390
libnvidia-fbc1-390:i386
libnvidia-gl-390
libnvidia-gl-390:i386
libnvidia-ifr1-390
libnvidia-ifr1-390:i386
linux-generic-hwe-20.04
linux-headers-generic-hwe-20.04
linux-image-generic-hwe-20.04
linux-libc-dev
linux-modules-nvidia-390-generic-hwe-20.04
nvidia-compute-utils-390
nvidia-dkms-390
nvidia-driver-390
nvidia-kernel-common-390
nvidia-kernel-source-390
nvidia-utils-390
xserver-xorg-video-nvidia-390
So far, so good. But it also wants to REMOVE the following two packages:
linux-modules-nvidia-390-5.13.0-37-generic
linux-modules-nvidia-390-5.13.0-39-generic
As 5.13.0-39 is my current working kernel, if the latter will be removed, I guess I will be unable to boot the previous kernel in case the upgrade goes wrong, as NVIDIA modules will be missing.
Has anybody done this already? Is it safe to do?
I did the partial upgrade today. Everything went well. The only thing that can be an issue is that the package
linux-modules-nvidia-390-5.13.0-39-generic
has been removed (what I was concerned of) so I would be probably unable to boot from previous kernel 5.13.0-39 should I ever choose to (everything related to even earlier kernel 5.13.0-37 was removed anyway after installing kernel 5.13.0-40, so 37 is not an issue). But because everything is working fine, I have no need to do it.The whole "partial upgrade" thing was probably caused by the fact that NVIDIA driver has been updated from version 144 to 147 and at the same time kernel was updated from 5.13.0-39 to 5.13.0-40.
The package
linux-modules-nvidia-390-5.13.0-39-generic
was incompatible with version 147 of the NVIDIA driver, because it requires version 144 (which is clearly displayed if I try to re-install it via Synaptic), so it had to be removed during upgrade (which is normally not done, all packages related to the previous kernel are kept and removed only after next kernel upgrade). This probably can't be done during regular upgrade (I guess), hence the "partial upgrade" procedure.So answering my own question, yes, it can be safely done.