Announcement

Collapse
No announcement yet.

update-grub doesn't seem to enter new kernel into menu.lst

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    update-grub doesn't seem to enter new kernel into menu.lst

    I seem to be booting from an older kernel, and I now know why: update-grub doesn't seem to be doing its job:
    Code:
    root@Lepiota:/boot# update-grub
    Searching for GRUB installation directory ... found: /boot/grub
    Searching for default file ... found: /boot/grub/default
    Testing for an existing GRUB menu.lst file ... found: /boot/grub/menu.lst
    Searching for splash image ... none found, skipping ...
    Found kernel: /boot/vmlinuz-2.6.28-11-generic
    Found kernel: /boot/vmlinuz-2.6.24-23-generic
    Found kernel: /boot/memtest86+.bin
    Updating /boot/grub/menu.lst ... Updating the default booting kernel
    done
    
    root@Lepiota:/boot# grep 28 /boot/grub/menu.lst
    root@Lepiota:/boot#
    The actual contents of /boot/grub/menu.lst contain no reference to the 2.6.28-11 kernel -- the grep is just a quick way of demonstrating that.

    I've encountered this problem before but just bypassed it by entering the correct kernel manually. I've also seen references to it in other posts.

    Is this really a bug or am I just overlooking something?

    #2
    Re: update-grub doesn't seem to enter new kernel into menu.lst

    mando-hacker -- one of our members -- seems to be encountering this in several posts recently. Could be a bug.

    An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

    Comment


      #3
      Bug!

      Originally posted by Qqmike
      mando-hacker -- one of our members -- seems to be encountering this in several posts recently. Could be a bug.
      It's either a bug or a piece of very obscure behavior. Fortunately, update-grub is a shell script, so there's some hope of diagnosing the problem without dealing with source files. No promises, but I might try to look at that myself, now that I've confirmed that I'm not alone.

      Whatever the problem, it's been around for quite a while.

      Comment


        #4
        Re: update-grub doesn't seem to enter new kernel into menu.lst

        Unfortunately I have not been able to really figure out what is happening. You need (and probably have) these lines in /etc/kernel-img.conf

        postinst_hook = update-grub
        postrm_hook = update-grub
        do_bootloader = no

        to make update-grub happen with a kernel update, but in some cases lately that does not seem to be enough.

        Comment


          #5
          update-grub itself is the problem

          Your comment would seem to imply that update-grub isn't being called when it should be, but I don't think that's the problem. When I called it explicitly (see the output in my earlier post) it still didn't do the job. A program that's not doing anything might give the illusion of a program that's not being called.

          I wonder why this problem hasn't struck more people. It doesn't seem to have attracted the attention I'd think it would -- updating your system but then still booting with the previous kernel.

          Comment


            #6
            Re: update-grub doesn't seem to enter new kernel into menu.lst

            confession time Been studying GRUB, writing how-to's for a couple years now. Have known in theory what update-grub should do. But I never could get it to generate menu.lst's or regenerate. I usually end up making up menu.lst by hand, or cheating or stealing or whatever.
            An intellectual says a simple thing in a hard way. An artist says a hard thing in a simple way. Charles Bukowski

            Comment


              #7
              Re: update-grub doesn't seem to enter new kernel into menu.lst

              Actually it doesn't imply that. It does imply that any person seeing this problem should look at that before they jump to conclusions.

              It is not that update-grub doesn't run. In another thread here you will find a case in which the OP was seeing the old menu entries in the boot menu even though menu.lst had been upgraded. I don't know how that makes sense. I thought that grub would read the new menu.lst file without any change to the boot record. Could the upgrade have somehow installed a boot record that points at the incorrect root, so it finds a different mwnu.lst? But where would it be?

              Also it is not sure that all of these failures to boot the new kernel have the same cause.

              Comment


                #8
                Role of grub-install

                Originally posted by mando_hacker
                In another thread here you will find a case in which the OP was seeing the old menu entries in the boot menu even though menu.lst had been upgraded.
                A possible explanation is that grub-install never got called. Until it's called, changes to menu.lst have no effect.

                Comment


                  #9
                  Re: update-grub doesn't seem to enter new kernel into menu.lst

                  If I understand grub correctly grub-install only needs to be called once to install a boot record that points to a directory and menu.lst file in a particular filesystem, and after that it will read that file and act on what is in it. If that is the case why would it need to be rerun after an upgrade? Seems to me that would only be a problem if the grub directory were moved to a different filesystem.

                  Comment


                    #10
                    Re: update-grub doesn't seem to enter new kernel into menu.lst

                    Just to let you know: I just found out yesterday that I have been booting the old kernel 2.6.27-11 too, since I upgraded tot 9.04 a week ago.
                    Yesterday I was trying to update Virtualbox to a newer version and it couldn find the correct kernel, that's how a figured it out.

                    Today I ran update-grub without changes, so I manually added the new kernel to menu.lst but I actually want a 'correct' Automagic boot list.
                    I will follow this thread for a few days, I guess

                    Thanx for reading

                    Comment


                      #11
                      Re: update-grub doesn't seem to enter new kernel into menu.lst

                      The only thing I can contribute here is my observation. A couple weeks ago, I noticed a reference on this forum to the 2.6.28-11 kernel. "Hmmmm" I said to myself -- I've accepted all update notifications -- why don't I have it? So, I opened synaptic and looked at the linux kernels, and there it was, not installed. So, I marked it for installation, hit "Apply" and it was installed, and the boot menu was updated immediately, apparently by update-grub.

                      Soooooooo, I guess it can work when the kernel is deliberately installed via the GUI package management front end. Which leaves open the question, why wasn't I offered the new kernel via the update notifier?

                      Comment


                        #12
                        Re: update-grub doesn't seem to enter new kernel into menu.lst

                        dibl, I suspect that you do not have one of the linux-image metapackages installed. Installing linux-image,linux-image-2.6 or one of the others will probably solve your problem.

                        For the others, did you upgrade to 9.04 from 8.04? I suspect you went from an older version of grub to an incompatible version and you missed the message that Debian presented because you used a GUI package manager. The message can be found in /usr/share/doc/grub/NEWS.Debian.gz.

                        Comment


                          #13
                          Re: update-grub doesn't seem to enter new kernel into menu.lst

                          Originally posted by mando_hacker
                          dibl, I suspect that you do not have one of the linux-image metapackages installed. Installing linux-image,linux-image-2.6 or one of the others will probably solve your problem.
                          I just installed linux-image but that doesn't seem to have helped.

                          For the others, did you upgrade to 9.04 from 8.04?
                          Yes.
                          I suspect you went from an older version of grub to an incompatible version and you missed the message that Debian presented because you used a GUI package manager. The message can be found in /usr/share/doc/grub/NEWS.Debian.gz.
                          That message dates back to 2006, it seems. More of a problem is the fact that it refers to necessary changes in /etc/kernel-img.conf, which no longer exists.

                          As an experiment, I inserted this line into the chunk of menu.lst that I modified to include the new kernel:

                          Code:
                          # This line should go away after calling update-grub.
                          It didn't.

                          Comment


                            #14
                            Re: update-grub doesn't seem to enter new kernel into menu.lst

                            The message I was referring to is

                            Versions of the kernel Linux newer than 2.6.23, like the ones included in
                            Debian Lenny, are known to differ slightly in their binary format, in a way
                            that very old versions of GRUB are unable to boot.

                            If you're upgrading GRUB in a system that was installed before Debian Etch,
                            and you have never manually updated your GRUB install, it is possible that
                            your system stops booting.

                            In order to prevent that, it is recommended that you install the latest GRUB
                            by issuing (as root) the following command after upgrading the grub package:

                            grub-install "(hd0)"

                            (assuming hd0 is mapped in /boot/grub/device.map to the disk used by your
                            BIOS to boot; in a multi-disk environment you might need to use a different
                            parameter)

                            Note: even if your setup is not affected by this problem, it is always a
                            good idea to keep your GRUB install up-to-date, so if in doubt it's best
                            that you update it anyway.

                            -- Robert Millan <rmh@aybabtu.com> Mon, 28 Jul 2008 20:19:52 +0200

                            I see now that it is in my debian installation but not in the Kubuntu installation. I'll bet it will solve your problem though.

                            Comment


                              #15
                              Still no luck

                              I tried grub-install as suggested by that post, but the test line that should be removed is still there.

                              As an experiment, suppose you try inserting that same line in your menu.lst and calling update-grub. See if the line goes away, as it should. You can always save the original menu.lst and restore it.

                              Comment

                              Working...
                              X