Recently, I compiled and installed kernel release 4.2.3 using below steps.
$ wget https://www.kernel.org/pub/linux/kernel/v4.x/linux-4.2.3.tar.gz
$ tar xzvf linux-4.2.3.tar.gz
$ cd linux-4.2.3
$ make menuconfig
Then after saving the default configuration shown in menuconfig,
$ make
$ make modules_install
$ make install
After I completed above steps, I could see the below changes:
vmlinuz-4.2.3
(along with other few files) was added to /boot/
directory.
grub
was updated .
Now, I have rebooted my computer, and, surprisingly, it has booted with no issues. Below is the system information now.
$ uname -a
Linux myMachine 4.2.3 #1 SMP Fri Oct 16 20:45:01 EDT 2015 x86_64 x86_64 x86_64 GNU/Linux
$ uname -r
4.2.3
$ cat /proc/version
Linux version 4.2.3 (sps@myMachine) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04) ) #1 SMP Fri Oct 16 20:45:01 EDT 2015
$
So it looks like new kernel (4.2.3) is running in my system (Please let me know if I need to check any other command (apart from uname
or cat /proc/version
) to be sure about the kernel that is running).
Now here is my issue:- I don't know what issues I will face later if I keep using this kernel.
So I want to revert back and start using the previous kernel again. How do I do it ?
I can still see the old vmlinuz-3.19*
(and other 3.19*
) files in /boot/
and also in boot/grub/grub.cfg
. But I do not know how to start using the old kernel once again ?
Bonus if I can select the kernel at boot time.
Well, you didn't package your kernel, which is going to make things a bit harder. First, you need to delete the following files:
Your compiled Linux has been removed. Now, you should be able to run
update-grub
and it, hopefuly, won't find anything related to your old kernel. Look at the output and see if the kernel you compiled is in there.If you want to select what kernel you want to use at startup, you have to set GRUB to show when you turn on your computer. Open up your favorite text editor as root and edit GRUB's configuration file, which is located at
/etc/default/grub
. You'll find a line that saysGRUB_TIMEOUT
. This setting says how many seconds you want GRUB to show. It's probably set to 0, which is where your problem lies. Set it to something like 5 seconds instead by changing the 0 to a 5. Also, is you see a line that says anything likeGRUB_HIDDEN_TIMEOUT
and/orhiddenmenu
, remove them in their entirety from the file. Save and exit, and make sure to runupdate-grub
. You should be able to reboot and see GRUB. If not, there are some other settings in GRUB's configuration file you'll have to play with. You can choose Ubuntu to go with the default kernel, or you can go to 'Advanced options for Ubuntu' to choose your kernel and access recovery mode for any given kernel.