New kernel won't load, keeps loading old version

New to Debian (Or Linux in general)? Ask your questions here!

New kernel won't load, keeps loading old version

Postby fmp » 2017-10-13 01:00

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.
fmp
 
Posts: 19
Joined: 2017-09-09 04:01

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

Postby debiman » 2017-10-13 06:26

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
debiman
 
Posts: 1305
Joined: 2013-03-12 07:18

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

Postby Thorny » 2017-10-13 12:37

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.
Thorny
 
Posts: 325
Joined: 2011-02-27 13:40

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

Postby p.H » 2017-10-13 19:13

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
p.H
 
Posts: 83
Joined: 2017-09-17 07:12

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

Postby stevepusser » 2017-10-13 21:00

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.
The MX Linux repositories: Backports galore! If we don't have something, just ask and we'll try--we like challenges. New packages: AzPainter 2.1.0, Pale Moon 27.5.0, Liquorix kernel 4.12-10, mpv 0.27.0, Kodi 17.3, 0ad 0.0.22, Mesa 13.0.6
User avatar
stevepusser
 
Posts: 8799
Joined: 2009-10-06 05:53

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

Postby p.H » 2017-10-13 21:04

Stevepusser, what is the point of this quote ?
p.H
 
Posts: 83
Joined: 2017-09-17 07:12

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

Postby fmp » 2017-10-14 00:27

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
fmp
 
Posts: 19
Joined: 2017-09-09 04:01

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

Postby p.H » 2017-10-14 07:25

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.
p.H
 
Posts: 83
Joined: 2017-09-17 07:12

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

Postby debiman » 2017-10-14 11:57

^ maybe first purge grub-legacy?
i really don't see the point of having 2 bootloaders installed.
User avatar
debiman
 
Posts: 1305
Joined: 2013-03-12 07:18

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

Postby fmp » 2017-10-14 17:51

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: 19
Joined: 2017-09-09 04:01

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

Postby fmp » 2017-10-14 17:54

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!!
fmp
 
Posts: 19
Joined: 2017-09-09 04:01

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

Postby debiman » 2017-10-15 07:05

^ nice!
User avatar
debiman
 
Posts: 1305
Joined: 2013-03-12 07:18


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable