Wednesday 29 June 2016

How to use an older kernel

Using an older kernel

The kernel is a fundamental key to an operating system. The kernel is essentially the part between software and hardware; the software interacts with the hardware by use of the kernel. Lots of people go on without the need to worry about the kernel and if you can avoid messing with anything, please do. 

In my case, I needed to use an older kernel. If you keep you're keeping up with my blog, you should know that I've had some pretty major sound issues with my Dell Latitude E5440. Using an older kernel lead me to a fix. 


Side track (skip if you don't have a Dell Latitude with a sound problem):

If you do own a Dell Latitude series where the sound doesn't work after you've upgraded or have a sound card similar to mine, with sound problems then this might work for you. When I installed Ubuntu 12.04 LTS (Trusty Tahir) the sound worked absolutely fine and then it would stop after I upgraded to a Ubuntu version any higher than that. In an attempt to fix my problem after an upgrade, I exported my alsa audio configuration in the hope that after I'd upgraded my distribution, I could restore the configuration and everything would work fine. 

This was not the case. Upon attempting to restore my alsa configuration (after installing Ubuntu 16.04) I was chucked a hardware error. Thus leading me to the idea it could be the kernel causing a problem. Using an older kernel fixed the problem and now Ubuntu can interact with my sound hardware perfectly. 

What you'll need

  • Either an upgraded machine with an older kernel you knew worked or the kernel installed, which you can grab from here
  • Another machine with this guide displayed, the machine you use the older kernel on you need to reboot at some stage
  • Basic Linux knowledge. 

Getting the machine to boot with an older kernel:

  1. If you're not on an upgraded machine, which has used an older kernel then install one from the link to the archives (above) 
  2. Turn your machine off
  3. Turn it on and get to the Grub boot menu ... you may need to press shift as you boot to get the menu to pause long enough to see the options
  4. You will need to take note of every option you select now
  5. Select Advanced Options. For me, it is: "Advanced options for Ubuntu"
  6. Then take note of the kernel or other option you choose. For me, I take pictures like the one below. 
  7. Hit enter on the kernel you want, just to check everything works fine. If it does, then continue this guide, if it doesn't you might want to try another one. I've had quite a few on my machine













Getting the machine to boot with an older kernel automatically

Now we've tested an older kernel and checked everything works, we can construct the change we will make to grub, so it does this every time the machine boots. To do this, we need to tell grub the options we selected to boot the older kernel. In my case:

"Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-91-generic"

The > indicates the next option we selected after Advanced options for Ubuntu. 

Take note this is case sensitive and the quotation marks are needed. 

Now all we need to do it edit our grub configuration with this option. In my case you can see I'm using the Linux 3.13.0-91 kernel. 

Now, we need to run this commands:

sudo nano /etc/default/grub

Now, change the grub default  option. Eg, mine is:
GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-91-generic"

Hit cntrl&x to close the file. 
Hit the 'y' key
Hit the return key to save the changes

If you did not use the sudo command, you will get an error: permission denied. 

Now, update grub with

sudo update-grub

That's it. After you run the last command you should see a quick flicker of text as it saves the settings. 

How to test for success:

If you reboot your machine and get to the grub menu again, you should see the options you wanted are highlighted automatically and all you need to do is hit enter. To see the kernel you're running, you can type 

uname-a 

in a terminal to get an output similar to this:

Linux Bella 3.13.0-91-generic #138-Ubuntu SMP Fri Jun 24 17:00:34 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux






No comments:

Post a Comment