1

I'm now running XUbuntu 16.04 with kernel 4.4.0-31 and now I need to somehow downgrade kernel to version 4.1.24. Is there any way to do that?

0

Install required packages:

sudo apt-get install git fakeroot build-essential 
sudo apt-get install libssl-dev bc ncurses-dev xz-utils
sudo apt-get install kernel-package 

Download the Linux kernel

wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.24.tar.xz
wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.1.24.tar.sign

verify kernel signatures

unxz linux linux-4.1.24.tar.xz
gpg --verify linux-4.1.24.tar.sign

If you get "Bad signatures" try the following answer

tar xvf linux-4.1.24.tar
cd linux-4.1.24
cp /boot/config-$(uname -r) .config
make menuconfig

Make sure that the Enable loadable module support is selected.

Save and exit

Compile the kernel:

make-kpkg clean
fakeroot make-kpkg --initrd --revision=1.0.NAS kernel_image kernel_headers -j 16

Type the following command to find the .deb files:

 ls  ../*.deb

Install the kernel files:

sudo dpkg -i linux-headers-4.1.24_1.0.NAS_amd64.deb
sudo dpkg -i linux-image-4.1.24_1.0.NAS_amd64.deb

Reboot you system.

From the advanced option of GRUB, choose to boot the new kernel.

You can find the old kernel using the following command:

dpkg --list | egrep -i --color 'linux-image|linux-headers'

To remove it :

sudo apt-get --purge remove linux-imagexxxxx
sudo apt-get autoremove

Edit To solve this error unxz : linux : no such file or directory , install xz-utils :

sudo apt-get install xz-utils
  • 1
    Error on this command: unxz linux linux-4.1.24.tar.xz : unxz : linux : no such file or directory – nikrom3000 Jul 17 '16 at 7:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.