I recently had a problem upgrading from the default kernel provided by the official Debian AMI (3.2.0-4) to something more recent in wheezy backports. The issue was quite simple but it stumped me pretty well! TL;DR extlinux-update is broken because it attempts to sort versions using:
sort -nr instead of the version option:
sort -Vr. In order to fix this you’ll need to replace these lines in
To boot from a volume (e.g. /boot is a fairly standard location) extlinux needs to know where to look for images. The boot location and a load of other configuruation options are spread across many files. These are in
/etc/default/extlinux and various config files in
/boot/extlinux/ (assuming extlinux is configured to run on /boot). All these configuration files are generated by one shell script:
I assume within this script the label with the lowest value will be run first i.e. from linux.conf
will take precendence over:
This illustrates the precise problem. extlinux-update always makes sure 3.2.0-4-amd64 always comes out above 3.16.0-0.bpo.4-amd64. The reason for this is simple, it’s the following line in extlinux-update:
sort -nr is a numerical ordering and numerically 3.2 > 3.16. Fortunately
sort also has a version ordering so change it to:
There has been a bug open about this for a while. I believe it should be fixed in jessie, but haven’t had the chance to check yet.
In the meantime I’ve had to replace the sort with some rather hacky shell as part of provisioning new AMIs with the desired kernel version.