Is it possible? I only want a few selected packages like the kernel (for hardware support), and leave everything else as-is on jessie. How can it be done? Thank you.
2 Answers
You can download Buster linux-image
package from Debian repository (it contains kernel, kernel modules and installation scripts in post-inst
). I've just tested this scenario but for Stretch (kernel was 4.9.0-5, now it's 4.15.0-2) and VM successfully loaded.
UPD
Also I forget to add that you can install new kernel package from backports Jessie repository directly or add to /etc/apt/sources.list
next strings and download new kernel package as ordinary via apt-get
:
# Backports repository
deb http://deb.debian.org/debian jessie-backports main contrib non-free
deb http://deb.debian.org/debian jessie-backports-sloppy main contrib non-free
If package from backports is enough for you, then it's the best approach then Buster package.
-
Yes, I mean "they're built to be tested". I did grammar mistakes. Sorry for my English, I'm not native speaker. Apr 20, 2018 at 8:20
-
Thanks for detailed explanation! Now, I completely understand Debian packets flow. I remove first sentence in my answer to exclude confusing for others. It's not correctly formed. Apr 20, 2018 at 9:05
Debian is well-known for its flexible package combinations. You would have no problem running a Kernel from buster on jessie.
Here are the steps that ensures you to only get necessary packages from buster, and keep everything else as-is.
1. Add buster source
Add buster source to your apt sources so that apt can fetch packages from a later release version.
Open /etc/apt/sources.list.d/buster.list
and add the source accordingly, components and mirrors of your choice.
# Buster repository
deb http://deb.debian.org/debian buster main
2. Add apt preference
Add apt preference file to ensure only essential packages are picked during installation.
Open /etc/apt/preferences.d/buster.pref
and add the preferences.
Package: *
Pin: release n=buster
Pin-Priority: 50
Package: linux-image-* grub* firmware-*
Pin: release n=stretch
Pin-Priority: 500
A priority of 50 will ensure its packages won't be pulled automatically unless it's required to resolve dependencies.
Note: grub does not have to be upgraded, but jessie came with 2.02~beta2 while buster comes with 2.02 GA, so why not.
3. Upgrade kernel and grub
apt-get install linux-image-amd64 grub-pc
reboot
After rebooting, you should find the new kernel running.
# uname -a
Linux pony 4.18.0-2-amd64 #1 SMP Debian 4.18.10-2 (2018-11-02) x86_64 GNU/Linux
The method above has been verified on both stretch-kernel-over-jessie and buster-kernel-over-jessie.