Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Kernel upgrade issue
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ONEEYEMAN
Advocate
Advocate


Joined: 01 Mar 2005
Posts: 3650

PostPosted: Sun Jul 28, 2024 5:48 am    Post subject: Kernel upgrade issue Reply with quote

Hi,
I recently upgraded the system and so made the jernel upgrade from 5.10.52 to 6.6.21.
I also tried to switch to use the Network Manager.

After that my WiFi interface failed to load.

I am now booted in the old kernel and have a Internet access,

I have an Intel WiFi card and no wired interface.

During the kernel upgrade I just chose what was selected as the default for a new config (which probably was not a good idea).

I don't have an old sources for 5.x kernel anymore. But I think I should still have an old config file.

Is it possible to track down what has changed in the new kernel configuration that prevented me to even rollback Network Manager on 6.6 one?

Or maybe I should abandon the idea and just drop the old kernel config into the new source tree and reconfigure?

What would be the easiest and less intrusive solution?

Thank you.
Back to top
View user's profile Send private message
bstaletic
Guru
Guru


Joined: 05 Apr 2014
Posts: 357

PostPosted: Sun Jul 28, 2024 8:58 am    Post subject: Reply with quote

I personally keep my kernel config around and just let portage figure out the difference between the kernel versions.

Could there be stuff in new kernels I might want to enable/disable were I to go through the new config options one by one?
Very possibly yes, but my strategy has never failed me so far.
That said, I update more often, so the incremental changes are much smaller than in your case.

You could also figure out what went wrong with your wifi card. Do you know which kernel options you actually need for it to work?
lspci -k is often helpful. lsmod as well. dmesg can tell you about lloaded firmware.
When you collect the data from a working kernel, you can boot the new one and check what you're missing. Or grep the new config from the old kernel.
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3005
Location: Edge of marsh USA

PostPosted: Tue Jul 30, 2024 4:45 am    Post subject: Reply with quote

5.10.52 to 6.6.21 is a really big jump, and your 5.10.52 had long been left behind in the 5.10.~ series. BTW, 6.6.38 is the latest, stable, longterm version.

There may be something missing from your kernel upgrade process. Did you copy the old .config into the new source directory? Did you run make oldconfig (or makeolddefconfig)?

There is a lot to be commended in upgrading the kernel in smaller steps. First, bring your 5.10.~ up-to date in that series. 5.10.221 the latest, stable version in that series. Use, test, take some time. Then 5.10 to 5.15, test, enjoy, then 5.15 to 6.1, etc.

Finally, if you upgrade the kernel more often it will be a lot easier, and you will become better at doing it. I brought a couple of computers up to 6.6.38 this morning. Each one took me about five minutes of my time. (Actually, the second one took a bit longer because I made a typo on the commandline.) What made it easier is that they were already running 6.6.21.
_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
sublogic
Apprentice
Apprentice


Joined: 21 Mar 2022
Posts: 269
Location: Pennsylvania, USA

PostPosted: Tue Jul 30, 2024 10:37 pm    Post subject: Reply with quote

To expand on figueroa's suggestion: see https://forums.gentoo.org/viewtopic-p-8777836.html#8777836.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5050
Location: Bavaria

PostPosted: Wed Jul 31, 2024 12:00 am    Post subject: Re: Kernel upgrade issue Reply with quote

ONEEYEMAN wrote:
HI recently upgraded the system and so made the jernel upgrade from 5.10.52 to 6.6.21.
I also tried to switch to use the Network Manager.

After that my WiFi interface failed to load.

It is possible that this is not the fault of the new kernel, but your switch from ? to network manager ... network management tools must not be used more than once (because they are mutually exclusive):
https://wiki.gentoo.org/wiki/Network_management
(So if you had netifrc before, you have to uninstall it; or at least remove it from the system startup).

ONEEYEMAN wrote:
Or maybe I should abandon the idea and just drop the old kernel config into the new source tree and reconfigure?

What would be the easiest and less intrusive solution?

The easiest solutions are not always the best. Please note: In the meantime, not only have some kernel options been added and others dropped, but there may also be new versions of firmware files. I would first get an overview of how things look today. To do this, I would boot with the latest GentooCD and run some queries ->

Paragraph 2 of https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_kernel_configuration#Before_you_start

(It must be a GentooCD, because the query “dmesg | grep firmware” only works for us; because we have a kernel patch for this: CONFIG_GENTOO_PRINT_FIRMWARE_INFO=y))

With very large version differences, it sometimes makes sense to carry out a completely new manual kernel configuration, because some options regarding performance and security may also be new for you. Of course I recommend my wiki articles (*) on this ... but at the moment there are efforts to simplify the MANUAL kernel configuration with “modprobed-db” ... but this is just at the beginning:

https://wiki.gentoo.org/wiki/User:Immolo/sandbox/kernel#Automatic_manual_process

*)
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Manual_Configuring_Kernel_Version_6.6
https://wiki.gentoo.org/wiki/User:Pietinger/Experimental
https://wiki.gentoo.org/wiki/User:Pietinger/Tutorials/Kernel_Hardening_with_KSPP

.
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
figueroa
Advocate
Advocate


Joined: 14 Aug 2005
Posts: 3005
Location: Edge of marsh USA

PostPosted: Wed Jul 31, 2024 3:21 am    Post subject: Reply with quote

My personal cheat sheet.
Code:
$ cat kernel.txt
# Install your new kernel sources. Using 4.9.233 throughout as example.
emerge -a gentoo-sources
Additional references:
https://forums.gentoo.org/viewtopic-p-2431534.html#2431534
http://kernel-seeds.bloodnoc.org/
Also Forums: Unsupported Software for Pappy's preconfigs and seeds

or, to install a specific version by specifying the version:

emerge -a =sys-kernel/gentoo-sources-4.9.233

# NB: /usr/src/linux should currently be a symlink to your current kernel sources.
# Copy the .config from your current kernel sources to your new kernel sources, i.e.
cd /usr/src/
cp linux/.config linux-4.9.233-gentoo/

# Remove the (old) symlink.
rm linux

# Create a new "linux" symlink to your new kernel sources, i.e.
ln -s linux-4.9.233-gentoo linux

# Alternatively, you can change/set the symlink using eselect. Example:
eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.9.221-gentoo
  [2]   linux-4.9.228-gentoo *
  [3]   linux-4.9.233-gentoo

eselect kernel set 3

# Be sure to check your work with:
eselect kernel list
Available kernel symlink targets:
  [1]   linux-4.9.221-gentoo
  [2]   linux-4.9.228-gentoo
  [3]   linux-4.9.233-gentoo *

or

ls -l
lrwxrwxrwx  1 root     root           20 Aug 24 13:20 linux -> linux-4.9.233-gentoo/
drwxr-xr-x 26 root     root         4096 May  5 22:58 linux-4.9.221-gentoo/
drwxr-xr-x 26 root     root         4096 Aug  9 23:11 linux-4.9.228-gentoo/
drwxr-xr-x 26 root     root         4096 Aug 24 13:41 linux-4.9.233-gentoo/

# Change to the new kernel sources directory using,
cd linux/

# Update .config according to new kernel options.
make oldconfig

# Configure the new kernel.
make menuconfig

# Compile the new kernel and install the modules.
make && make modules_install

# Copy important kernel boot files to /boot
cp .config /boot/config-4.9.233-gentoo
cp System.map /boot/System.map-4.9.233-gentoo
cp arch/x86/boot/bzImange /boot/kernel-4.9.233-gentoo

# Alternatively, I understand instead of manually copying files to /boot, one
# can run "make install" which will do it for you automatically. I've never
# done it that way. My way contributes to developing muscle memory.

# remove old symlink "vmlinuz" to old /boot/kernel-n.n.nnn-gentoo and create new
# symlink "vmlinuz" to new kernel file
cd /boot
rm vmlinuz
ln -s kernel-4.9.233-gentoo vmlinuz

# Configure boot loader (grub assumed).
grub-mkconfig -o /boot/grub/grub.cfg

And, don't forget "emerge @module-rebuild" to compile and re-install external kernel modules.

Reference: https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Kernel

Note: https://www.kernel.org/doc/html/v5.4/admin-guide/pm/cpufreq.html
Note: https://www.kernel.org/doc/html/v5.10/admin-guide/pm/cpufreq.html

_________________
Andy Figueroa
hp pavilion hpe h8-1260t/2AB5; spinning rust x3
i7-2600 @ 3.40GHz; 16 gb; Radeon HD 7570
amd64/23.0/split-usr/desktop (stable), OpenRC, -systemd -pulseaudio -uefi
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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