How can I change the default boot menu option from the grub command line?

No, there is no way to change the default boot menu from the grub command line. The easiest way to do this is by booting into Linux.

Next time you boot, look at the order of boot options. Let's say you want to make Windows the default boot option, note down the line it is on, i.e. the 4th or whatever.

Edit /etc/default/grub

Find the line -

GRUB_DEFAULT=0

Subtract 1 from the number you noted above, let's it was 4 and change the text to read

GRUB_DEFAULT=3


Run update-grub2 from the shell.


Using the Super Grub Disk is easier than using a live CD.

See this tutorial : GRUB 2 recovery.

Tags:

Grub