Ubuntu – How to change the default grub option in Ubuntu 14.04

14.04grub2

How do you change the default Grub boot option in Ubuntu 14.04? This has been asked and answered for older versions, but these solutions no longer seem to work for 14.04.

Specifically, the version of Grub used in 14.04 now has two screens. The first screen lists:

Ubuntu (default)
Ubuntu advanced
memory test
memory test (other options)

And all the other actual kernel options are hidden under the "Ubuntu advanced" sub-menu.

I installed 14.04 server, but for some reason, it's using the generic-kernel. Unfortunately, the option to use the server kernel is listed under the "Ubuntu advanced" menu, and the GRUB_DEFAULT index in /etc/default/grub doesn't effect or select from those.

I tested this by changing the GRUB_DEFAULT to 4, corresponding to the 5th option under the "Ubuntu advanced" grub menu, but it still booted using the "Ubuntu (default)" generic kernel. How do I fix this?

Best Answer

For example if the desired default kernel to boot was the third one on the "Ubuntu advanced" menu, the the grub line would be:

GRUB_DEFAULT="1>2"

The lines start counting from 0, so the "1" means the second line of the first, or main menu, the "Ubutnu advanced" one. The "2" means the third line of that menu.

By the way, note that there is no longer any difference in Ubuntu kernels between desktop and server, they both now use the same kernel.