Changing Default Boot in UBuntu with grub 2
Steps:
1. Open /boot/grub/grub.cfg to check boot items, in my case I want to select Window 7 as default boot.
Find for the line:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set have_grubenv=true
load_env
fi
set default="Windows 7 (loader) (on /dev/sda2)"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
2. Copy "Windows 7 (loader) (on /dev/sda2)"
3. Open /etc/default/grub, find the line GRUB_DEFAULT=0 and change it to
GRUB_DEFAULT="Windows 7 (loader) (on /dev/sda2)"
4. Update/boot/grub/grub.cfg using sudo update-grub.
5. Reboot to check the changes.
If you are lazy,just install StartUp-Manager in Ubuntu software center or via apt-get
Comments
Post a Comment