Thursday, March 13, 2014

Setup default OS using Grub2

Grub2 provides command line options for changing preference of default operating system, but many of us still do the the way editing files, Since setting up default OS is done once in months so no once remembers the defaults grub commands and everyone ends up searching up grub conf file and setting it manually. writing this blog to keep the short way documented ;)

here is the command to list all the options available 

grep ^menuentry /boot/grub2/grub.cfg | cut -d "'" -f2

select the desired OS you want to boot as default and
 
grub2-set-default

and make it permanent 
 
grub2-mkconfig -o /boot/grub2/grub.cfg

No comments:

Post a Comment