Kodi Community Forum

Full Version: Live/Win 7 dual boot. Default OS
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all. I'd like my Live/Win7 install to boot Win7 as default OS, however I cannot work out how to edit Grub(2?) to do this. Not strictly a XBMC issue I know, but lack of an Ubuntu gui in the live install coupled with a complete lack of Linux know-how is working against me. Any help much appreciated.
Info:-
XBMC Live installed on USB drive
Win7 installed on HDD
All working well, just want to set grub to boot Win7 as default.
CheersSmile
Can you edit

/boot/grub/grub.cfg

so that the GRUB_TIMEOUT=0, i.e. zero seconds,
and the defualt GRUB_DEFAULT=the row in which the OS you want load is in
Just to clarify NebulaOdyssey's post, from Live you would hit CTRL+ALT+F1 to go to the terminal, then type
Code:
sudo nano /boot/grub/grub.cfg
to edit the grub config file. After making the changes, hit CTRL+X to save and exit. You can then type
Code:
sudo shutdown -r now
to test if it worked.
Just to clarify reverendj1's post, after editing grub.cfg, you need to perform the following:
Code:
sudo update-grub

Otherwise the changes made won't be written to /boot/grub/grub.conf. Without grub.conf being updated, your changes will not have been made.
Thanks for the replies guys. I'll see how it goes and report back.
Cheers.
you should never edit /boot/grub/grub.cfg directly. i think the file tells you this.

the reason for the misinformation in this thread is because the original grub had just one file that you edited. grub2 works differently

edit /etc/default/grub
Code:
sudo nano /etc/default/grub

change the GRUB_DEFAULT=0 (or whatever it is, to the number of the windows 7 entry. remember that numbers start at 0 so if windows 7 is your 3rd entry, you'd change it to GRUB_DEFAULT=2)

then do
Code:
sudo update-grub
and then reboot with
Code:
sudo reboot
D'oh! Didn't notice that reverendj1 was editing /boot/grub/grub.cfg directly. Yeah, that's bad juju. As aeiah pointed out, you want to edit /etc/default/grub. The options in that file are limited and it's used to change /boot/grub/grub.cfg when you perform and update-grub. Editing /boot/grub/grub.cfg directly is dangerous. If you screw something up via a fat-finger or typo, you could possibly have a problem on your hands. Most of the time it's difficult to really break badly by going through /etc/default/grub.
Thanks to all who replied. 'Tis all sorted out now Smile
All the best.
My bad... Blush

I've always edited it directly, I didn't know there was a proper way. Of course I also think breaking computers is part of the joy of having them. Laugh