PureOS - Missing Kernel Headers


#1

Good day,

I recently installed VMware Workstation. During the installation I was advised I needed linux-headers-4.19.0-5. I run an apt install for “linux-headers-4.19.0-5-all” and everything was fine. However, the next time I booted my laptop (Librem 13 v4) LUKS was not excepting my passphrase. Having encountered something similar sometime ago (not with PureOS) I rebooted the laptop and used my previous Kernel, linux-image-4.19.0-2-amd64. After doing so all was well with regard to LUKS.

I still had a problem with VMware Workstation where it asked for linux-headers-4.19.0-5-amd64. I presume this was because, even though they exist on the laptop, I was running linux-image-4.19.0-2-amd64. To stop the LUKS issue reoccurring I removed the linux-image-4.19.0-5-amd64 (apt remove --purge linux-image-4.19.0-5-amd64). I intended to address the LUKS issue later.

Now, when I open VMware Workstation I’m advised “Kernel Headers 4.19.0-2-amd64” were not found. As I understand, the headers should reside in “/usr/src/”. However this location only has Linux Headers relating to 4.19.0-5. Why is there no 4.19.0-2 header files? I have looked for them in the PureOs repo, but they are not found. I only find 4.19.0-5 & 4.19.0-6. I know I can get them else where, but I’m rather hesitant to proceed without having more info.

As you will have gathered from my description above, I’m far from a Linux specialist, so any assistance would be most welcome. I think if I get the Kernel Headers for 4.19.0-2 sorted VMware Workstation will ask for 4.19.0-5, but I will move on to that later.

Thanks.


#2

I did a package search for the linux-headers package in PureOS and found about 40 hits;
https://software.pureos.net/search_pkg?term=linux-headers

But I didn’t find the headers you’re looking for. I think they are a good bit older and likely should not be used, the newer kernel and headers should be used instead.

Is it possible for you to solve the LUKS problem on the newer kernel? If we can find out what caused the LUKS problem that might help, especially when new kernels (with security fixes) arrive.


#3

Hi Jeremiah,

thanks for your prompt response.

Is there a reason my Kernel wouldn’t have updated when I always apply updates that are available? Here are my sources taken from /etc/apt/sources.list

deb https://repo.puri.sm/pureos amber main
deb https://repo.pureos.net/pureos/ amber-security main
deb https://repo.pureos.net/pureos/ amber-updates main

My preference would certainly be to run the latest kernel. I’m happy to install the latest stable kernel available to me and provide any info regarding my LUKS issue. Could you tell what details you would like (what log output etc.)?

If I enter “apt install linux-headers” and hit tab my choice only seems to be 4.19.0-5 or 4.19.0-6. I notice in the link you provided there is also a 5.2.0-3. This I don’t see. I have a feeling I’m not using “apt” properly and maybe be seeing cached info?

Thanks.

EDIT: I see why I don’t see the 5.2.0-3 Kernel, I don’t have the byzantium or landing repo in my Sources. This means 4.19.0-6 is the latest for me.


#4

ok, I have resolved this issue but have questions. It would be great if someone could provide some answers or information.

I updated to the latest available Kernel, linux-image-4.19.0-6-amd64, and rebooted. Everything was fine, no LUKS issue, great! I tried to start VMware Workstation and got a message about the “linux-headers-4.19.0-6” being missing. I checked /usr/src and no headers were there for 4.19.0-6. I installed “linux-headers-4.19.0-6-all” and VMware workstation now works.

Questions:
I’m still confused why my Kernel wasn’t updated when I update PureOS? Is there some config that stops Kernel updates?

Why isn’t the kernel Headers installed when the Kernel is installed? I realise the Kernel is very complex, but I would appreciate if someone could help me understand. From what I read, I thought headers are a requirement for the Kernel to work with other software?


#5

Headers contain definitions needed to build/compile software, but not needed to run it.


#6

Thanks for clearing that one up.

Is there are specific reason why the headers wouldn’t be provided with the kernel? Does it just come down to allowing the user choice?

Do you happen to know why my Kernel wasn’t updated when the update was released into the repo? Do I perhaps need to change a setting?


#7

Regarding your kernel update - it just hadn’t come through into the mirrors yet. The interface I linked to allows one to search our archives, there is a lag between what is in our archives and what you can update. This is true for me too - I couldn’t update to the newer kernel either until later in the day.