This document is intended to describe the behavior of the kernel packages in respect to the Ubuntu Policy Manual
The kernel package maintains a the notion of the current kernel; the default kernel at boot time. This is expressed using the symbolic link /vmlinuz and /initrd. These are updated at the end of installing a new kernel.
This policy defines how the default kernel is selected when more than one kernel is installed. Put informally, we wish to use the latest kernel in the users preferred flavour. The current default kernel is chosen according to the following rules:
- the current default kernel should be the latest kernel in the default flavour; where the default flavour is the flavour of the default kernel as it was before installation or removal commenced,
- unless no kernels remain in the current flavour, then the latest kernel in another flavour should be selected preferring the flavour with the latest kernel,
- unless more than one alternative flavour exists with equivalent versions, then select the lexographically lowest available flavour,
- unless no kernels remain, where there should be no default
Updates to the default kernel at user instigation occur outside these rules and do not affect them.
Note: As an exception of this rules we have to prevent opted-in kernels from becoming the default kernel automatically. So probably adding matching code to the version checking that ignores the version numbers of mainline, daily and backported kernels.