Welcome! Log In Create A New Profile

Advanced

Kernel Update Questions

Posted by mikeh49 
Kernel Update Questions
February 15, 2020 01:02PM
I'm confused about the kirkwood kernel update process. I updated a Pogo E02 OK, but am running into problems with a Dell M300.
  1. The kernel tarball contains 2 .deb files, but only the image file is installed by the instructions. Where is the headers file used?
  2. At the mkimage step, the instructions state: "Generate the uImage and uInitrd (the kernel files vmlinuz-5.5.1-kirkwood-tld-1 and initramfs-5.5.1-kirkwood-tld-1 were generated by dpkg in Step 3)" However, after running the dpkg, I don't have the initramfs file.

Based upon instructions for an older kernel, I tried installing the headers package but it failed with a a corrupt file error:
tar: Exiting with failure status due to previous errors
dpkg-deb: error: tar subprocess returned error exit status 2

It looks like the initramfs file is actually created by the second mkimage command using the initrd.img file.

I need some guidance. Thanks.

Update 1: Followed the instructions (correctly) and all good. M300 booted fine on kernel 5.5.1. I'm still wondering about the headers .deb file though.

Update 2: In the Kirkwood kernel thread, I think the note before the mkimage steps should say initrd.img... rather than initramfs... like in the Oxnas kernel thread.



Edited 2 time(s). Last edit at 02/15/2020 02:06PM by mikeh49.
Re: Kernel Update Questions
February 15, 2020 04:58PM
Mike,

> Update 1: Followed the instructions (correctly)
> and all good. M300 booted fine on kernel 5.5.1.
> I'm still wondering about the headers .deb file
> though.

Cool! The header .deb file should be installed the same way as the kernel image .deb.

dpkg -i linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb

You can also install them at the same time, if you know you always need it to recompile some modules or some stand alone executable.

dpkg -i linux-image-5.5.1-kirkwood-tld-1_1.0_armel.deb linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb


>
> Update 2: In the Kirkwood kernel thread, I think
> the note before the mkimage steps should say
> initrd.img... rather than initramfs... like in the
> Oxnas kernel thread.

Thanks! that typo has been there a while and nobody bother to point out :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Kernel Update Questions
February 15, 2020 05:57PM
To be clear, I should install the headers file with dkpg also? If so, there must be a problem as I tried that and it did not complete, complaining of a problem with the tar. The md5 of the full tarball checked good. I see if I have the complete log and update. However, the M300 seems to be running fine.
Re: Kernel Update Questions
February 15, 2020 06:16PM
> To be clear, I should install the headers file
> with dkpg also?

No need to install it. The headers come in to play only if you are going to compile something. Such as a module that is not in the kernel. Or you'd write code and compile it to run some apps of your own.


> If so, there must be a problem as
> I tried that and it did not complete, complaining
> of a problem with the tar. The md5 of the full
> tarball checked good.
> I see if I have the
> complete log and update.

Try this command and post the log

ls -lh linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb
dpkg -i linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb

BTW, any time when in doubt, and you want to see all kernel versions installed on your box, use dpkg -l:

dpkg -l | grep linux-image
dpkg -l | grep linux-header

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 02/15/2020 06:18PM by bodhi.
Re: Kernel Update Questions
February 15, 2020 06:39PM
Ran fine this time...
root@m300-2:/boot# ls -lh linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb
-rw-r--r-- 1 root root 11M Feb  2 01:03 linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb
root@m300-2:/boot# dpkg -i linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb
(Reading database ... 15907 files and directories currently installed.)
Preparing to unpack linux-headers-5.5.1-kirkwood-tld-1_1.0_armel.deb ...
Unpacking linux-headers-5.5.1-kirkwood-tld-1 (1.0) ...
Setting up linux-headers-5.5.1-kirkwood-tld-1 (1.0) ...
root@m300-2:/boot#

Dunno what happened the first time. Good to know it's only needed to compile a kernel. I am pretty sure I'll never get to that.

Note no headers for 5.2.9. You don't include them in the file system, I guess?
root@m300-2:/boot# dpkg -l | grep linux-image
ii  linux-image-5.2.9-kirkwood-tld-1   1.0                           armel        Linux kernel binary image for version 5.2.9-kirkwood-tld-1
ii  linux-image-5.5.1-kirkwood-tld-1   1.0                           armel        Linux kernel, version 5.5.1-kirkwood-tld-1
root@m300-2:/boot# dpkg -l | grep linux-header
ii  linux-headers-5.5.1-kirkwood-tld-1 1.0                           armel        Linux kernel headers for 5.5.1-kirkwood-tld-1 on armel

My recently upgraded Pogo E02 has no headers at all, just the 5.2.9 and 5.5.1 kernel images.

Thanks for the info.
Re: Kernel Update Questions
February 15, 2020 09:18PM
Mike,


> Dunno what happened the first time. Good to know
> it's only needed to compile a kernel. I am pretty
> sure I'll never get to that.

Not the kernel. Sometime you would plug in a gadget, and the module supporting that device is not in the kernel. So you would want to be able to download the module source, compile and run it. Very rarely that you would need a new kernel to manage a new device. But I'd always like to know that so I can include the module for new device in the next release, to save users some maintenance effort.


> Note no headers for 5.2.9. You don't include them
> in the file system, I guess?

The kernel headers is large in size. And the rootfs would grow significantly, relative to the basic rootfs I released, if I had pre-installed the headers deb. So it is something users would need to learn to to do it when they need to compile new modules.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: Kernel Update Questions
February 16, 2020 09:13AM
OK, all good now. Thanks for all your help and info on this stuff.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: