Ubuntu update kernel switch kernel boot

  
        

1. Check the kernel commands that need to be updated:

apt-cache search linux

This command will display all available kernels

2. Install the kernel, Assuming you are installing a kernel of 2.6.339-0, use the following command

sudo apt-get install linux-headers-2.6.39-0-generic linux-image-2.6.39-0- Generic

After installation, reboot can be started, after restarting, it is started with the new kernel

======================= ============================================================ If you want to change Back to the original kernel, for example, the original is 3.2, then use the command


1. grep menuentry /boot/grub/grub.cfg This command displays the order of the kernel, such as: 



menuentry 'Ubuntu, with Linux 3.2.17experimental' --class ubuntu --class gnu-linux --class gnu --class os {menuentry 'Ubuntu, with Linux 3.2.17experimental (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {menuentry 'Ubuntu, with Linux 3.2.17-chipsee' --class ubuntu --class gnu-linux --class gnu --class os {menuentry 'Ubuntu, with Linux 3.2.17-chipsee (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os { Menuentry 'Ubuntu, with Linux 3.2.0-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {menuentry 'Ubuntu, with Linux 3.2.0-23-generic (recovery mode) ' --class ubuntu --class gnu-linux --class gnu --class os {menuentry "Memory test (memtest86+)" {menuentry "Memory test (memtest86+, serial console 115200)"2. Suppose you want Start with the 3.2.17 kernel version, change 


GRUB_DEFAULT=0

in the file /etc/default/grub to

GRUB_DEFAULT=2 after saving< Br>

3. Then use the command sudo update-grub


4. After rebooting, use the command uname -a to view the kernel as the kernel you want.
Copyright © Windows knowledge All Rights Reserved