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

 

 

 

[SOLVED] Kernel upgrade from jessie to stretch

New to Debian (Or Linux in general)? Ask your questions here!
Post Reply
Message
Author
mzperx
Posts: 6
Joined: 2018-11-26 09:17

[SOLVED] Kernel upgrade from jessie to stretch

#1 Post by mzperx »

Hi,

I have problem with kernel upgrade, I have performed an upgrade process but the kernel stayed 3.16 not 4.9.

I have a virtual machine where are running debian (the hypervisor is XEN) where I performed an upgrade from wheezy to stretch in two steps: wheezy -> jessie and jessie -> stretch.
First I have installed kernel meta package then the kernel upgrade was successful from 3.2 to 3.16 when I upgraded to jessie.
Then I upgraded to stretch but the kernel stayed 3.16.

~# cat /etc/debian_version
9.6
~# uname -a
Linux xxxxxx 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64 GNU/Linux

I tried these commands:
apt clean (and dpkg -clear-avail) and apt-get update.

But:
~# apt-cache search linux-image- | grep -i amd
linux-image-amd64 - Linux for 64-bit PCs (meta-package)
linux-image-3.16.0-7-amd64 - Linux 3.16 for 64-bit PCs
linux-image-3.2.0-6-amd64 - Linux 3.2 for 64-bit PCs

But there are 4.9 packages but they are not amd64 packages what I need:
~# apt-cache search linux-image- | grep -i 9.0-7
linux-headers-4.9.0-7-686 - Header files for Linux 4.9.0-7-686
linux-headers-4.9.0-7-686-pae - Header files for Linux 4.9.0-7-686-pae
linux-headers-4.9.0-7-rt-686-pae - Header files for Linux 4.9.0-7-rt-686-pae
linux-image-4.9.0-7-686 - Linux 4.9 for older PCs
linux-image-4.9.0-7-686-dbg - Debug symbols for linux-image-4.9.0-7-686
linux-image-4.9.0-7-686-pae - Linux 4.9 for modern PCs
linux-image-4.9.0-7-686-pae-dbg - Debug symbols for linux-image-4.9.0-7-686-pae
linux-image-4.9.0-7-rt-686-pae - Linux 4.9 for modern PCs, PREEMPT_RT
linux-image-4.9.0-7-rt-686-pae-dbg - Debug symbols for linux-image-4.9.0-7-rt-686-pae

Any suggestion please?
Last edited by mzperx on 2018-11-27 09:44, edited 3 times in total.

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

Re: Kernel upgrade from jessie to stretch

#2 Post by p.H »

Looks like you installed an i386 system with amd64 kernel. Check with

Code: Select all

dpkg --print-architecture # should print "i386"
dpkg --print-foreign-architectures # should print nothing
Debian 9 for i386 does not provide an amd64 kernel any more. You must add the amd64 architecture.

Code: Select all

dpkg --add-architecture amd64
apt-get update
apt-get install linux-image-amd64

mzperx
Posts: 6
Joined: 2018-11-26 09:17

Re: Kernel upgrade from jessie to stretch

#3 Post by mzperx »

Hi,

you are right!

~# dpkg --print-architecture
i386
~# dpkg --print-foreign-architectures
~#

Does it mean that I use i386 packages but with amd64 kernel?
What will happen if I perform your suggested steps? Will apt replace all i386 packages and reinstall amd64 packages (I'm talking not about kernel packages, I talking other packages like apache2 etc...)?

I ask it because it is a live system and I would like to handle it carefully!

This server has originally lenny as I remember and during releases I forgot to migrate it to 64bit.

Thank you for your help!

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

Re: Kernel upgrade from jessie to stretch

#4 Post by p.H »

mzperx wrote:Will apt replace all i386 packages and reinstall amd64 packages
No. It will just replace Jessie linux-image-amd64:i386 with Stretch linux-image-amd64:amd64 so that linux-image-4.9*-amd64 can be pulled.

mzperx
Posts: 6
Joined: 2018-11-26 09:17

Re: Kernel upgrade from jessie to stretch

#5 Post by mzperx »

~# dpkg --print-foreign-architectures
amd64

apt clean; apt-get update;
~# apt-get install linux-image-amd64
linux-image-amd64 is already the newest version (3.16+63+deb8u3).

~# dpkg -l | grep -i linux-image-
ii linux-image-3.16.0-7-amd64 3.16.59-1 i386 Linux 3.16 for 64-bit PCs
ii linux-image-3.2.0-6-amd64 3.2.102-1 i386 Linux 3.2 for 64-bit PCs
ii linux-image-amd64 3.16+63+deb8u3 i386 Linux for 64-bit PCs (meta-package)

mzperx
Posts: 6
Joined: 2018-11-26 09:17

Re: Kernel upgrade from jessie to stretch

#6 Post by mzperx »

apt-get install linux-image-amd64:amd64
helped, now it is installed and waiting for reboot.

mzperx
Posts: 6
Joined: 2018-11-26 09:17

Re: Kernel upgrade from jessie to stretch

#7 Post by mzperx »

p.H wrote:
mzperx wrote:Will apt replace all i386 packages and reinstall amd64 packages
No. It will just replace Jessie linux-image-amd64:i386 with Stretch linux-image-amd64:amd64 so that linux-image-4.9*-amd64 can be pulled.
After reboot it works well, thank you for your help!

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

Re: Kernel upgrade from jessie to stretch

#8 Post by p.H »

Sorry, I thought that linux-image-amd64 being only available in the amd64 architecture in Stretch, it was not necessary to force the architecture. Did you remove Jessie's repositories in source.list ? What is the output of

Code: Select all

apt-cache policy linux-image-amd64

mzperx
Posts: 6
Joined: 2018-11-26 09:17

Re: Kernel upgrade from jessie to stretch

#9 Post by mzperx »

sources.list:
deb http://deb.debian.org/debian/ stretch main contrib non-free
deb http://security.debian.org/ stretch/updates main contrib
deb http://deb.debian.org/debian/ stretch-updates main contrib non-free

I have rebooted the system with kernel 4.9.

~# apt-cache policy linux-image-amd64
linux-image-amd64:amd64:
Installed: 4.9+80+deb9u6
Candidate: 4.9+80+deb9u6
Version table:
*** 4.9+80+deb9u6 500
500 http://deb.debian.org/debian stretch/main amd64 Packages
500 http://security.debian.org stretch/updates/main amd64 Packages
100 /var/lib/dpkg/status


But your suggestion helped thank you again!

macky
Posts: 9
Joined: 2018-11-11 16:18

Re: [SOLVED] Kernel upgrade from jessie to stretch

#10 Post by macky »

This sort my problem! Thanks

Post Reply