[SOLVED] Installing correct kernel source

You have a problem with Salix? Post here and we'll do what we can to help.

[SOLVED] Installing correct kernel source

Postby pnbalaji » 12. Aug 2017, 18:15

Hi,

I have been running Salix 14.2 on my laptop for several years and this week I installed Salix on my desktop also.

My WiFi adapter in my desktop is buggy and I need to build a patch in order to get it work correctly. I installed dkms without any issues.

However, I am not able to install the correct kernel source. See the results below.

Code: Select all
jumper@darkstar ~ $ uname -a
Linux darkstar 4.4.19 #2 SMP Mon Aug 22 14:37:39 CDT 2016 x86_64 Intel(R) Core(TM)2 Duo CPU     E8400  @ 3.00GHz GenuineIntel GNU/Linux
jumper@darkstar ~ $

jumper@darkstar ~ $ sudo slapt-get -i kernel-source
Reading Package Lists...Done
The following NEW packages will be installed:
  kernel-source
0 upgraded, 0 reinstalled, 1 newly installed, 0 to remove, 0 not upgraded.
Need to get 86.8MB of archives.
After unpacking 625.2MB of additional disk space will be used.
1/1 Get http://mirrors.xmission.com/salix/x86_64/slackware-14.2/ kernel-source 4.4.75-noarch-1 [86.8MB]...^C0%



As you can see from the above, the installed kernel is 4.4.19 whereas when I try to install the kernel-source, it is trying to pull the source for 4.4.75 instead of 4.4.19.

Can someone help on how to install the kernel-source for 4.4.19? Why is it trying to pull the source for 4.4.75 though the installed kernel is 4.4.19?

Thanks,
Balaji.
Last edited by pnbalaji on 13. Aug 2017, 02:30, edited 1 time in total.
pnbalaji
 
Posts: 61
Joined: 23. Apr 2013, 21:02

Re: Installing correct kernel source

Postby ChuangTzu » 12. Aug 2017, 19:43

you need to upgrade your kernel first:

Code: Select all
sudo slapt-get -i kernel-huge kernel-firmware kernel-modules


do not upgrade the kernel headers unless changing to a different kernel series

then
Code: Select all
sudo lilo -v


then reboot and install
Code: Select all
sudo slapt-get -i kernel-source


Ref: https://docs.salixos.org/wiki/How_to_in ... ent_kernel
User avatar
ChuangTzu
Donor
 
Posts: 231
Joined: 19. May 2015, 23:34

Re: Installing correct kernel source

Postby pnbalaji » 13. Aug 2017, 00:02

It did not work. See the result below when I tried to upgrade the kernel.

Code: Select all
jumper@darkstar ~ $ sudo slapt-get -i kernel-huge kernel-firmware kernel-modules
Password:
Reading Package Lists...Done
kernel-huge is up to date.
kernel-firmware is up to date.
kernel-modules is up to date.
0 upgraded, 0 reinstalled, 0 newly installed, 0 to remove, 0 not upgraded.

Done

jumper@darkstar ~ $ ll /var/log/packages/kernel*
-rw-r--r-- 1 root root  55990 Aug 12 18:51 /var/log/packages/kernel-firmware-20170626git-noarch-1
-rw-r--r-- 1 root root  25087 Aug 12 18:51 /var/log/packages/kernel-headers-4.4.75-x86-1
-rw-r--r-- 1 root root    969 Aug 12 18:51 /var/log/packages/kernel-huge-4.4.75-x86_64-1
-rw-r--r-- 1 root root 248542 Aug 12 18:51 /var/log/packages/kernel-modules-4.4.75-x86_64-1


It appears that I have the 4.4.75 kernel, but "uname -r" is showing only 4.4.19.

One more thing, I did not install lilo. I installed grub2 as the boot manager.

Thanks,
Balaji.
pnbalaji
 
Posts: 61
Joined: 23. Apr 2013, 21:02

Re: Installing correct kernel source

Postby ChuangTzu » 13. Aug 2017, 01:34

try
Code: Select all
sudo update-grub


or the manual way:
https://www.linuxquestions.org/questions/linux-software-2/updating-grub-after-kernel-compile-501738/

then reboot

if grub is not updated then you will still run the old kernel.....
User avatar
ChuangTzu
Donor
 
Posts: 231
Joined: 19. May 2015, 23:34

Re: Installing correct kernel source

Postby pnbalaji » 13. Aug 2017, 02:09

I actually followed my own topic https://forum.salixos.org/viewtopic.php?f=30&t=7089 to install grub2 and I ran update-grub as part of the grub install process.

Thanks,
Balaji.
pnbalaji
 
Posts: 61
Joined: 23. Apr 2013, 21:02

Re: [SOLVED] Installing correct kernel source

Postby pnbalaji » 13. Aug 2017, 02:32

Actually re-running the "sudo update-grub" helped. I am able to build the patch for my rtl8192cu chipset based wifi adapter and now my WiFi is working fine.

Thanks for your help.

Thanks,
Balaji.
pnbalaji
 
Posts: 61
Joined: 23. Apr 2013, 21:02

Re: [SOLVED] Installing correct kernel source

Postby ChuangTzu » 13. Aug 2017, 21:46

Glad it helped. :)
User avatar
ChuangTzu
Donor
 
Posts: 231
Joined: 19. May 2015, 23:34


Return to Problems