3

I installed Ubuntu MATE and Kubuntu on my Laptop. I want to change the order of booting. Every time I restart I have to scroll down and hit enter to log into Kubuntu. My main priority is Kubuntu. How can I change the order in GRUB so that Kubuntu boots automatically if I don't select MATE?

1 Answer 1

8

Better method is to repeat last boot selection

The reason I say this is because sometimes when you are running Windows it will wake up at 3 am, mysteriously update, reboot, finish updating and go back to sleep. If your default was Ubuntu but periodically boot into Windows and put your system to sleep the Windows updates could start but never finish.

Another reason to repeat the last boot selection is you might be working in Kubuntu for a week, then working in Mate for a week. It's easier if Grub just remembered your last boot selection and you don't have to keep overriding every boot.

Another reason to repeat the last boot selection is if you are overriding the kernel for a few days or weeks in the Advanced Options menu. Even more so if like me you have 20+ kernels (each with three options regular, safe and repair mode) could mean a lot of arrow keys.

How to get Grub to repeat last boot selection

This is fairly straight forward. Using sudo powers edit /etc/default/grub and change the following:

#GRUB_DEFAULT=0 # Rather than option #1, we'll always default to last boot choice.
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

The first line you will be commenting out and right below that insert the next two lines.

Save the file and type in the terminal:

sudo update-grub

If you still want your original request

You can set the default boot selection by menu entry number where 0 is the first entry:

As above edit /etc/default/grub but this time use:

GRUB_DEFAULT=0

Remove the # at the beginning of the line to transform it from a comment into a command. Use 0 for menu first entry, 1 for second menu entry, etc.

See the link above for more details on setting a sub-menu entry as the default boot selection in Grub.

10
  • is this aplicable to my versions GRUB 2.02 beta3-4. My kubuntu version is 17.10..I try what u said but it says error: cant find command 'sudo'. Feb 4, 2018 at 23:23
  • As far as I know the sudo command is available on all Linux distributions. What does it say when you type in the terminal which sudo? Feb 4, 2018 at 23:28
  • I see in the boot menu press enter to boot the selected OS, 'e' ro edit the commands before booting or 'c' for a command-line.. I select 'c' and it shows this. grub>_. Feb 4, 2018 at 23:37
  • Sorry I didn't mean to get a terminal in grub. I meant once you are in Kubuntu or in Mate hold down three keys <Ctrl>+<Alt>+T to open a terminal window. Then you can type which sudo. Feb 4, 2018 at 23:39
  • im in kubuntu terminal now.. i write, sudo power edit /etc/default/grub... sudo: power: command no found... Feb 4, 2018 at 23:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .