Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

New kernel won't load, keeps loading old version

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
fmp
Posts: 40
Joined: 2017-09-09 04:01

New kernel won't load, keeps loading old version

#1 Post by fmp »

I received a prompt today after running apt upgrade that I was running an unexpected kernel.. need to reboot, etc.

Reboot...
old kernel still loads.

Code: Select all

$ 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-4.9.0-4-amd64
Found kernel: /boot/vmlinuz-4.9.0-3-amd64
Updating /boot/grub/menu.lst ... done
reboot..
old kernel still loads.

Code: Select all

update-initramfs -u
reboot..
same..

Code: Select all

apt-get --reinstall install linux-image-4.9.0-4-amd64
reboot..
same.

/etc/default/grub changed GRUB_DEFAULT=0 to:

Code: Select all

GRUB_DEFAULT="Advanced options for Debian GNU/Linux>Debian GNU/Linux, with Linux 4.9.0-4-amd64"
current:

Code: Select all

$ uname -r
4.9.0-3-amd64

Is this a bug in the package manager, or my system? Usually the kernel updates itself upon reboot, never had the old one stick like this before.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: New kernel won't load, keeps loading old version

#2 Post by debiman »

look at the generated grub.cfg which kernel it chooses?
reinstall grub?
remove evtl existing "quiet splash" options and see what actually happens?

that "menu.lst" in your grub output looks suspicious - or at least, i don't get it on mine.
not sure what it means.

User avatar
Thorny
Posts: 542
Joined: 2011-02-27 13:40

Re: New kernel won't load, keeps loading old version

#3 Post by Thorny »

I haven't seen a message running an "unexpected kernel", was that the exact phrasing and was there much more to the message?

If I saw the conditions detailed by fmp, I might think that I was running the old GRUB, "menu.lst" terminology is from GRUB previous to GRUB2. That's not to say that one couldn't use the old GRUB<1.0 to boot Stretch but I'd think that fmp would have mentioned that if it was the case.

Like debiman, I would expect Stretch to be updating GRUB to grub.cfg. What version number is shown on the GRUB boot screen?

Is this a single OS system or is it multi-booted. If Multi, are you sure the GRUB in Stretch is controlling the boot?

/etc/default/grub, GRUB_DEFAULT=0, was correct, as then the system should be set to choose the latest kernel installed as default when it rewrites the menu.

I like debiman's suggestion to turn off quiet boot and see if the printout gives you any more ideas. ..Or us any more troubleshooting data.

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: New kernel won't load, keeps loading old version

#4 Post by p.H »

debiman wrote:that "menu.lst" in your grub output looks suspicious - or at least, i don't get it on mine.
not sure what it means.
It means that update-grub updated the config file for GRUB legacy, not the one for GRUB 2 (grub.cfg).
So if the GRUB actually booting is GRUB 2, that updated config file is just ignored.

What is the output of the following commands ?

Code: Select all

dpkg -l "grub*"
ls -l /boot/grub

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: New kernel won't load, keeps loading old version

#5 Post by stevepusser »

From https://lists.debian.org/debian-announc ... 00007.html
As a special case for this point release, those using the "apt-get" tool
to perform the upgrade will need to ensure that the "dist-upgrade"
command is used, in order to update to the latest kernel packages. Users
of other tools such as "apt" and "aptitude" should use the "upgrade"
command.
MX Linux packager and developer

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: New kernel won't load, keeps loading old version

#6 Post by p.H »

Stevepusser, what is the point of this quote ?

fmp
Posts: 40
Joined: 2017-09-09 04:01

Re: New kernel won't load, keeps loading old version

#7 Post by fmp »

p.H wrote: What is the output of the following commands ?

Code: Select all

dpkg -l "grub*"
ls -l /boot/grub

Code: Select all

root@[~]# dpkg -l "grub*"
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad)
||/ Name           Version      Architecture Description
+++-==============-============-============-=================================
un  grub           <none>       <none>       (no description available)
ii  grub-common    2.02~beta3-5 amd64        GRand Unified Bootloader (common 
un  grub-coreboot  <none>       <none>       (no description available)
un  grub-efi       <none>       <none>       (no description available)
rc  grub-efi-amd64 2.02~beta3-5 amd64        GRand Unified Bootloader, version
un  grub-efi-amd64 <none>       <none>       (no description available)
un  grub-efi-ia32  <none>       <none>       (no description available)
un  grub-efi-ia64  <none>       <none>       (no description available)
un  grub-emu       <none>       <none>       (no description available)
un  grub-ieee1275  <none>       <none>       (no description available)
ii  grub-legacy    0.97-72      amd64        GRand Unified Bootloader (Legacy 
un  grub-legacy-do <none>       <none>       (no description available)
un  grub-linuxbios <none>       <none>       (no description available)
un  grub-pc        <none>       <none>       (no description available)
un  grub-xen       <none>       <none>       (no description available)
un  grub-yeeloong  <none>       <none>       (no description available)
un  grub2          <none>       <none>       (no description available)
un  grub2-common   <none>       <none>       (no description available)
root@[~]# ls -l /boot/grub
total 1388
-rw-r--r-- 1 root root     191 Jun  7 18:31 default
-rw-r--r-- 1 root root      30 Jun  7 18:31 device.map
drwxr-xr-x 2 root root    4096 May 19 20:28 fonts
-r--r--r-- 1 root root    6909 May 26 19:24 grub.cfg
-rw-r--r-- 1 root root    1024 May 19 20:28 grubenv
drwxr-xr-x 2 root root    4096 May 20 23:18 locale
-rw-r--r-- 1 root root    4416 Oct 12 20:49 menu.lst
-rw-r--r-- 1 root root    4416 Oct 12 20:49 menu.lst~
-rw-r--r-- 1 root root 1363161 May 19 20:28 unicode.pf2
drwxr-xr-x 2 root root   12288 May 20 23:18 x86_64-efi
stevepusser wrote:As a special case for this point release, those using the "apt-get" tool
to perform the upgrade
I did not perform a dist-upgrade, the new kernel was obtained in a typical apt update/apt upgrade combo; I was already running stretch.

This *is* a dual boot machine and I see the grub options loading on every boot. (Debian, Advanced Options, Windows 10, etc)

Here is a screenshot of the kernel warning:
Image

p.H
Global Moderator
Global Moderator
Posts: 3049
Joined: 2017-09-17 07:12
Has thanked: 5 times
Been thanked: 132 times

Re: New kernel won't load, keeps loading old version

#8 Post by p.H »

Indeed the currently installed GRUB package is grub-legacy, the old GRUB 1.
But the package grub-efi-amd64 was installed and removed, and the GRUB EFI is boot loader is still present in /boot/grub and has been updated for the last time in may, 26th.

Can you confirm that the GRUB menu displayed at boot time is still from GRUB 2 (version shown at the top of the screen) ?

Why did you install grub-legacy ?

Re-installing the package grub-efi-amd64 and its dependencies should fix things.

User avatar
debiman
Posts: 3063
Joined: 2013-03-12 07:18

Re: New kernel won't load, keeps loading old version

#9 Post by debiman »

^ maybe first purge grub-legacy?
i really don't see the point of having 2 bootloaders installed.

fmp
Posts: 40
Joined: 2017-09-09 04:01

Re: New kernel won't load, keeps loading old version

#10 Post by fmp »

p.H wrote: Why did you install grub-legacy ?
I didn't. I actually have no clue how it came about.

Code: Select all

apt-get upgrade grub
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Note, selecting 'grub-legacy' instead of 'grub'
grub-legacy is already the newest version (0.97-72).
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
apt install grub-efi-amd64:

Code: Select all

apt install grub-efi-amd64
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  lib32ncurses5 lib32tinfo5 libc6-i386
Use 'apt autoremove' to remove them.
The following additional packages will be installed:
  efibootmgr grub-efi-amd64-bin grub2-common libefiboot1 libefivar1
The following packages will be REMOVED:
  grub-legacy
The following NEW packages will be installed:
  efibootmgr grub-efi-amd64 grub-efi-amd64-bin grub2-common libefiboot1
  libefivar1
0 upgraded, 6 newly installed, 1 to remove and 0 not upgraded.
Going to reboot now and see what happens!

fmp
Posts: 40
Joined: 2017-09-09 04:01

Re: New kernel won't load, keeps loading old version

#11 Post by fmp »

Code: Select all

uname -a
Linux debian 4.9.0-4-amd64 #1 SMP Debian 4.9.51-1 (2017-09-28) x86_64 GNU/Linux
:D
Thanks for the help, guys!!


Post Reply