Help Center> Elastic Cloud Server> Troubleshooting> Linux ECS Issues> How Do I Change the Default Boot Kernel in Ubuntu?
Updated on 2022-07-15 GMT+08:00

How Do I Change the Default Boot Kernel in Ubuntu?

Scenarios

The operations described in this section only apply to ECSs running Ubuntu 16.04.

Procedure

  1. Assume that the desired default kernel to boot from is the third one. Open the /etc/default/grub file and change the value of GRUB_DEFAULT to "1>2", as shown in Figure 1.
    Figure 1 Modifying GRUB_DEFAULT
    • 1 in 1>2 indicates the second entry of the main menu.

    • 2 in 1>2 indicates the third entry of the submenu.

    • There is no space before and after the greater-than sign (>) in 1>2.
    • Use a set of quotation marks to enclose 1>2.
  2. Run the following command to rebuild a grub configuration file:

    # update-grub