You are not logged in.

#1 2016-04-06 21:13:45

vladc
Member
Registered: 2016-04-06
Posts: 3

[SOLVED]Kernel headers missing

Hi,
I have arch installed on a partition of my surface pro 3 since november (i use refind as bootloader). Yesterday I tried to upgrade everything but I got an error on kernel upgrade. Initially I didn't thought it was a big deal but on reboot I got one more entry in the bootloader menu and couldn't boot none of the 2 arch entries. I resolved  restoring the old kernel (chrooting from a live usb) and found the problem.
Essentially, I learned that, for upgrading/compiling the kernel I need the headers. The problem is that I have not the headers for my running kernel (4.2.5-1) and pacman gives me the new one (4.4.5-1). Mkinitcpio gives me " '/lib/modules/4.2.5-1-ARCH' is not a valid kernel module directory". I searched on google but couldn't find 4.2.5-1 version.
Is it possible to upgrade or I have to reinstall everything?
Thank in advance wink

Last edited by vladc (2016-04-07 05:33:24)

Offline

#2 2016-04-06 21:18:12

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,734
Website

Re: [SOLVED]Kernel headers missing

So you're system is out of sync and partial updates are unsupported and silly.  Why not just chroot in and update the system then and install the headers?  Maybe I'm missing something...

Offline

#3 2016-04-06 21:21:52

vladc
Member
Registered: 2016-04-06
Posts: 3

Re: [SOLVED]Kernel headers missing

graysky wrote:

So you're system is out of sync and partial updates are unsupported and silly.  Why not just chroot in and update the system then and install the headers?  Maybe I'm missing something...

Now everything is updated but the kernel.
Even from chroot (but after the restore of the 4.2.5 kernel I can boot the system) I can't upgrade the kernel (mkinicpio does not find 4.2.5 modules).

Offline

#4 2016-04-06 23:00:36

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED]Kernel headers missing

Can you post the complete output from pacman.log when you try to upgrade to the latest kernel from chroot.
I don't understand why mkinitcpio would give you an error about missing modules for the old kernel.

You don't need headers to boot into the latest kernel. They are usually only required if you need to build out-of-tree kernel modules with dkms (e.g. virtualbox, nvidia-dkms).
These days those modules get automatically rebuilt after kernel upgrade.

I think you should run 'pacman -Syu' more often to prevent these kind of issues.

Offline

#5 2016-04-06 23:46:35

vladc
Member
Registered: 2016-04-06
Posts: 3

Re: [SOLVED]Kernel headers missing

ooo wrote:

Can you post the complete output from pacman.log when you try to upgrade to the latest kernel from chroot.
I don't understand why mkinitcpio would give you an error about missing modules for the old kernel.

You don't need headers to boot into the latest kernel. They are usually only required if you need to build out-of-tree kernel modules with dkms (e.g. virtualbox, nvidia-dkms).
These days those modules get automatically rebuilt after kernel upgrade.

I think you should run 'pacman -Syu' more often to prevent these kind of issues.

I totally should run 'pacman -Syu' more often...

I don't know why, but upgrading to the new kernel seems to want the headers of the running one.

Anyway, I got through this after some reading of arch wikis when I found the one talking about ALA where I found the headers for the old kernel. I installed them, tried again to upgrade the kernel and everything went well.

Thanks for trying to help wink

Offline

#6 2016-04-06 23:57:27

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: [SOLVED]Kernel headers missing

I was supposed to mention ALA, but apparently forgot. Nevertheless, glad to hear you got it sorted.

Please mark the thread as solved by editing the first post and prepending the tag [SOLVED] to the title.

Offline

Board footer

Powered by FluxBB