Re: linux-image-2.6.32-trunk-686 causing grub problems: alphabetical

On Tue, Mar 16, 2010 at 09:03 -0400, Stephen Powell wrote:
On Tue, 16 Mar 2010 08:26:40 -0400 (EDT), Mitchell Laks wrote:

I notice that others had problems with grub not updating the kernel
from linux-image-2.6.32-trunk-686 to linux-image-2.6.32-3-amd64
and I had this same problem.

I suspect that this is because the heuristic that dpkg or apt or aptitude update
is using
finds that linux-image-2.6.32-trunk-686 is greater than linux-image-2.6.32-3-amd
64 alphabetically
even though it is the older kernel
and this is breaking all of your automatic grub updates done by debian packaging.

that is the reason we are all suffering....

I don't think this has anything to do with the package management system.
My guess is that grub2 simply makes a list of all files in /boot which begin
with linux-image, sorts them in descending order by the ASCII collating
sequence, and the one which comes out on top is the default kernel.
The problem is the decision to use "trunk" in the original 2.6.32 kernel
image name. This sorts higher than any numeric value. I use lilo; so this
doesn't affect me; but doesn't grub2 have some option for remembering
the last kernel booted and making that the default? If you don't want to
remove/purge the old kernel, it seems to me that that would be the way to go.

Exactly. The relevant code is:

--- /etc/grub.d/10_linux -----------------------------------------------
list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* ; do
if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi

Which obviously does not special-case -trunk-, so it sorts based on
LC_COLLATE. Looks as if the -trunk- name was a particularly bad choice
and I'm not sure what is the best way to solve this problem.

The easiest way would be to enforce a strict naming scheme (maybe with
lintian) so the aforementioned code can stay as simple as it is today.
.''`. Wolodja Wentland <wentland@xxxxxxxxxxxxxxxxxxxx>
: :' :
`. `'` 4096R/CAF14EFC
`- 081C B7CD FF04 2BA9 94EA 36B2 8B7F 7D30 CAF1 4EFC

Attachment: signature.asc
Description: Digital signature

Relevant Pages

  • Re: Anf?nger, blutig
    ... in welchen Runlevel mein Linux booten soll. ... >und der Dokumentation zu Grub ueberfordert? ... >Kernel laden und starten. ... Booten dem Kernel irgendwelche Parameter mit auf den Weg gegeben ...
  • Re: Linux von einer auf andere Platte portieren?
    ... Kernel, der nicht in lilo.conf eingetragen ist? ... vielen von mir betreuten Rechnern das Booten von CD-ROM, ... dass grub etwas auf die Platte schreibt. ... Rechner, die von anderen Leuten benutzt werden. ...
  • Re: Problem with the serial port in Fedora Core 6
    ... I've never seen the labels that you have added in grub and wonder ... expecting a pair of around the word 'menu', or maybe a kernel ... bugzilla the missing ttyS's, but bugzilla didn't like my password. ... and serial ports which appears to be exactly your issue and a suggestion ...
  • Re: Looooong Horror story, 10.04.4 LTS on an amd turion 64 bit laptop version
    ... I had a hell of a time making networking work and finally in my ... I used a procedure which installed a custom combo of kernel 3.5.7 + ... One of the packages I saw go by was grub. ... Does this special linux spin have all the drivers? ...
  • Re: booting without initrd
    ... One important job of the initrd is to load ... drivers which aren't compiled directly into the base kernel image. ... may be a good exercise to learn about the kernel/root filesystem startup; ... grub gets confused when you use the vmalloc and mem kernel parameters. ...