First, make a backup copy of `/etc/default/grub`. In case something goes wrong, you can easily revert to the known-good copy:

  sudo cp /etc/default/grub /etc/default/grub.bak

Then edit the file using `vim` or the text editor of your choice:

  sudo vim /etc/default/grub

Find the line that contains

  GRUB_DEFAULT=0

and set it to

  GRUB_DEFAULT=x

where `x` is the index of grub menu item to which you would like to boot to by default. Note that the menu items are zero-indexed. That means that the first item in the list is `0` and that the sixth item is actually `5`. So to boot to the sixth item in the list, the line would read:

  GRUB_DEFAULT=5

If you forgot the order of the items, take a look at `/boot/grub/grub.cfg`. Each menu entry is specified by a line of type:

  menuentry 'Ubuntu' [options] {

You can also chose the default by the name instead of index, e.g.:

  GRUB_DEFAULT='Ubuntu'

if there was a `menuentry 'Ubuntu'` line on `/boot/grub/grub.cfg`. This may be a better method, as it does not depend on the order of the entries, which could change.

To use a kernel in the “Previous Linux Versions” sub-menu use:

  GRUB_DEFAULT="Previous Linux Versions>x"

(make sure to include the quotations), where `x` is the index of the old kernel on the sub-menu, or the name of the kernel as it appears in `/boot/grub/grub.cfg`. For example,

Then build the updated grub menu:

  sudo update-grub

Using an index can be pretty messy - the list of OSes can change after an update. But you can have a look into /boot/grub/grub.cfg and search for the name of desired default OS. Then use the quoted name instead of an index. Example:

  GRUB_DEFAULT="Microsoft Windows XP Professional (on /dev/sda1)"

instead of GRUB_DEFAULT=7