Kernel.img backup/copy

Could it be possible for the rbp1-kernel-osmc (probably behaves the same on other iterations) to create a copy of the kernel, say /boot/kernel.img-4.4.3-1-osmc, the same way it does for the vmlinuz files for instance?

There’s plenty of space in the /boot partition for this I believe.

Noobs installs have very little space on the partitions so it’s not the case that there is plenty of room.

What is it you’re trying to do that you think you need backups of kernel.img ?

I just think it could be useful to sometimes debug some issues, is all.

You can already change the active kernel without reinstalling it. For example on a Pi 2 you could do:

sudo dpkg-reconfigure rbp2-image-4.4.3-1-osmc

This will re-run the post installation script making this kernel the active one. Remember that it’s not enough to just copy a kernel.img, you must also copy the device tree overlays (which the above reconfigure command does) and be sure that you have /lib/modules for the kernel installed.

This is only the case if I have the .deb files, right?
Is there a place where they’re downloadable?
Or is only the latest version in the repos?

No, as long as the old kernel package is still installed this will work. (You can prevent old kernels from being automatically removed by editing /etc/osmc/prefs.d/update_preferences)

If the old kernel package is not installed then copying kernel.img alone is not going to work for you anyway as you will not have a matching /lib/modules directory or device tree. It will “boot” but many things will not work including some hardware devices.

We don’t keep them forever, but generally the last several versions are left in the APT repo for a while.

If you do an apt-cache search you will find them - but they follow standard naming so if you know the kernel version you will be able to figure out the package name anyway.

Also, unless you run apt-get clean any previous version you have installed will also still be in the APT cache at /var/cache/apt/archives/

1 Like

Thanks! This is the bit I needed to know!