Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot upgrade kernel
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Sun Jul 02, 2017 4:35 am    Post subject: Cannot upgrade kernel Reply with quote

Hello,

I'm hoping someone here might be able to help me.

I have kernel 4.9.16 running on my system and everything seems to be fine. I recently did a system update and kernel 4.9.34 was installed.
I figured I would install it and start using it.

I set the kernel to 4.9.34

Code:
log # eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.9.16-gentoo
  [2]   linux-4.9.34-gentoo *


I copied my working config file from 4.9.16 in to /usr/src/linux

I run 'make oldconfig' in /usr/src/linux

I next run 'genkernel all'

listing /boot I see everything looks to be installed.

Code:

log # ll /boot/
total 82M
 16K drwxr-xr-x  4 root root  16K Dec 31  1969 ./
1.0K drwxr-xr-x 22 root root 1.0K Jun 25 20:08 ../
8.0K drwxr-xr-x  3 root root 8.0K Jun 24 03:19 EFI/
3.1M -rwxr-xr-x  1 root root 3.1M Jun 27 20:46 System.map-genkernel-x86_64-4.9.16-gentoo*
3.1M -rwxr-xr-x  1 root root 3.1M Jul  1 23:36 System.map-genkernel-x86_64-4.9.34-gentoo*
8.0K drwxr-xr-x  6 root root 8.0K Jul  1 08:50 grub/
 33M -rwxr-xr-x  1 root root  33M Jun 27 20:48 initramfs-genkernel-x86_64-4.9.16-gentoo*
 33M -rwxr-xr-x  1 root root  33M Jul  1 23:44 initramfs-genkernel-x86_64-4.9.34-gentoo*
5.2M -rwxr-xr-x  1 root root 5.1M Jun 27 20:46 kernel-genkernel-x86_64-4.9.16-gentoo*
5.2M -rwxr-xr-x  1 root root 5.2M Jul  1 23:36 kernel-genkernel-x86_64-4.9.34-gentoo*


Boot into new kernel and I get CLI and no X. running startx only errors out dropping me to the cli once again.

What am i missing here? System is up to date.

Thanks for your help.
Back to top
View user's profile Send private message
ian.au
Guru
Guru


Joined: 07 Apr 2011
Posts: 450
Location: Australia

PostPosted: Sun Jul 02, 2017 6:21 am    Post subject: Reply with quote

SP2340,

Pretty hard to diagnose from the info supplied. What is in dmesg / boot log?
Back to top
View user's profile Send private message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Sun Jul 02, 2017 7:21 am    Post subject: Reply with quote

You are correct.

DMESG https://pastebin.com/3u1EgJzp
Kern.log https://pastebin.com/mCGz5zCf
Messages https://pastebin.com/F6uBFEuR
Syslog https://pastebin.com/4H22b98e
Xorg.log https://pastebin.com/uHEuEHHy
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44195
Location: 56N 3W

PostPosted: Sun Jul 02, 2017 8:47 am    Post subject: Reply with quote

SP2340,

Code:
[    47.412] (II) Module glx: vendor="NVIDIA Corporation" 


You are using the nvidia binary blob driver. Its in two parts. A kernel part (which is now missing) and an Xorg part.
Run
Code:
emerge @module-rebuild
to rebuild all of your out of kernel modules against the new kernel.
That should pull in nvidia-drivers and any other out of kernel bits and pieces you have.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Sun Jul 02, 2017 1:31 pm    Post subject: Reply with quote

Thnx NeddySeagoon. So if I'm understanding you correctly every time I install a new kernel I need to run the module-rebuild.
Should I boot into the new kernel and do this or can I do thins while still in the old one?
Also how will this effect the system if I would ever fall back to an older version of kernel, would I have to run this command?
Back to top
View user's profile Send private message
Naib
Watchman
Watchman


Joined: 21 May 2004
Posts: 5712
Location: Removed by Neddy

PostPosted: Sun Jul 02, 2017 2:13 pm    Post subject: Reply with quote

SP2340 wrote:
Thnx NeddySeagoon. So if I'm understanding you correctly every time I install a new kernel I need to run the module-rebuild.
Should I boot into the new kernel and do this or can I do thins while still in the old one?
Also how will this effect the system if I would ever fall back to an older version of kernel, would I have to run this command?
you can do it from the old. The key is what /use/src/Linux points to (symlink manaully set or set via eselect kernel). Emerge nvidia-drivers will build for whatever this points to
_________________
The best argument against democracy is a five-minute conversation with the average voter
Great Britain is a republic, with a hereditary president, while the United States is a monarchy with an elective king
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44195
Location: 56N 3W

PostPosted: Sun Jul 02, 2017 4:24 pm    Post subject: Reply with quote

SP2340,

The nvidia kernel module and its Xorg partner need to be the same versions.
Providing that a kernel upgrade does not get a new nvidia-drivers, switching kernels is as easy as choosing a different kernel at boot time.

When you have not used an older kernel for a while, nvidia-drivers may get updated in the normal course of your updates.
When you go back to the old kernel, the versions won't match and Xorg will fail in just the same way as you have seen.

The fix is to eselect the old kernel, or revert the /usr/src/linux symlink to point to the old kernel, then rebuild nvidia drivers.
This updates the kernel module in the old kernel. The sign that you need to do this is that Xorg doesn't work.
There will all we version mismatch errors in your logs.
Put the symlink back to the new kernel when the rebuild is complete.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Sun Jul 02, 2017 4:38 pm    Post subject: Reply with quote

I'm now running 4.9.34 thanks to everyone advice here.

So here are the steps I used to upgrade my kernel in case someone else stumbles across this post with similar issues.

    1. Upgrade the system, I use emerge --update --deep --with-bdeps=y @world
    2. Point the system to use the new kernel with eselect kernel set #
    3. Copy .config file from the old kernel tree into the new kernel tree
    4. Use make oldconfig to import your old config into the new kernel
    5. Install the new kernel with genkernel all
    6. Rebuild all modules for the new kernel with emerge @module-rebuild
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44195
Location: 56N 3W

PostPosted: Sun Jul 02, 2017 4:43 pm    Post subject: Reply with quote

SP2340,

A detail,

3. Copy .config file from the old kernel tree into the new kernel tree
4. Use make oldconfig to import your old config into the new kernel
5. Install the new kernel with genkernel all

This depends on how your genkernel is configured. By default, genkernel all uses its own configuration, not the one you have just moved from the old kernel.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Juippisi
Developer
Developer


Joined: 30 Sep 2005
Posts: 378
Location: /home

PostPosted: Mon Jul 03, 2017 6:39 am    Post subject: Reply with quote

SP2340 wrote:

    1. Upgrade the system, I use emerge --update --deep --with-bdeps=y @world
    2. Point the system to use the new kernel with eselect kernel set #
    3. Copy .config file from the old kernel tree into the new kernel tree
    4. Use make oldconfig to import your old config into the new kernel
    5. Install the new kernel with genkernel all
    6. Rebuild all modules for the new kernel with emerge @module-rebuild


You can skip steps 3 and 4 if you give genkernel right parameters, like genkernel --kernel-config=/etc/kernels/your_current_kernel_config or point it to old /usr/src/linux-current/.config
Back to top
View user's profile Send private message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Fri Jul 14, 2017 11:20 am    Post subject: Reply with quote

Soory for the late replies. Life can get in the way at times.

NeddySeagoon wrote:
SP2340,

A detail,

3. Copy .config file from the old kernel tree into the new kernel tree
4. Use make oldconfig to import your old config into the new kernel
5. Install the new kernel with genkernel all

This depends on how your genkernel is configured. By default, genkernel all uses its own configuration, not the one you have just moved from the old kernel.


From what I was told if I do the above step genkernel should be using the config file I added as it imports all the settings from my config into it's config file. I'm also under the assumption that genkernel uses the .config file in the /usr/src/linux directory.
Back to top
View user's profile Send private message
SP2340
n00b
n00b


Joined: 01 Nov 2016
Posts: 50
Location: KeyStoneState

PostPosted: Fri Jul 14, 2017 11:22 am    Post subject: Reply with quote

Juippisi wrote:
SP2340 wrote:

    1. Upgrade the system, I use emerge --update --deep --with-bdeps=y @world
    2. Point the system to use the new kernel with eselect kernel set #
    3. Copy .config file from the old kernel tree into the new kernel tree
    4. Use make oldconfig to import your old config into the new kernel
    5. Install the new kernel with genkernel all
    6. Rebuild all modules for the new kernel with emerge @module-rebuild


You can skip steps 3 and 4 if you give genkernel right parameters, like genkernel --kernel-config=/etc/kernels/your_current_kernel_config or point it to old /usr/src/linux-current/.config


I'll have to keep this in mind for the next kernel build. Thnx.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum