Live/Win 7 dual boot. Default OS
#1
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
Reply
#2
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
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
Reply
#3
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.
Reply
#4
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.
Reply
#5
Thanks for the replies guys. I'll see how it goes and report back.
Cheers.
Reply
#6
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
Reply
#7
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.
Reply
#8
Thanks to all who replied. 'Tis all sorted out now Smile
All the best.
Reply
#9
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
Reply

Logout Mark Read Team Forum Stats Members Help
Live/Win 7 dual boot. Default OS0