Live/Win 7 dual boot. Default OS
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.
XBMC Live installed on USB drive
Win7 installed on HDD
All working well, just want to set grub to boot Win7 as default.
Can you edit


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
Antec Fusion Micro 350 Remote | AMD AM3 X2 240e (45W) Sythe Shuriken Rev.B | Gigabyte MA785GMT-UD2H | Onboard ATI HD4200 | 2 x 1GB Kingston HyperX DDR3 1333 | Antec 350W 80+certified PSU | 2x Samsung Spinpoint F3 1TB | KWorld USB DVB-T395 | HDD Dual boot XBMC Live Dharma 10.0 + Win7
Just to clarify NebulaOdyssey's post, from Live you would hit CTRL+ALT+F1 to go to the terminal, then type
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
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:
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.
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
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
sudo update-grub
and then reboot with
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
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
Live/Win 7 dual boot. Default OS00
This forum uses Lukasz Tkacz MyBB addons.