Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I recently installed a copy of CentOS onto my main hard drive (I now have Windows 7 and CentOS). Whilst installing CentOS, I accidentally set it to be the main boot option, so when I start my PC I have three seconds to select Windows 7 or it automatically boots into CentOS. I would rather Windows 7 be the default option -- how can I change it?

share|improve this question
    
Can you paste the output of cat /boot/grub/menu.lst, I can alter the settings so that Windows can be default boot option for you. –  Nikhil Mulley Jan 9 '12 at 7:13

1 Answer 1

CentOS uses GRUB for its bootloader. There's a page in the CentOS install guide that covers modifying GRUB's configuration. First, you need to open /boot/grub/grub.conf in a text editor, but the text editor needs to be running as root so you'll have permission to edit the file. One way is to run this in a terminal:

$ sudo gedit /boot/grub/grub.conf

Once you have the file open, look for default near the beginning. The options are 0-indexed, so if it says default 0 it means it'll default to the first option in the list. Change it to e.g. default 1 if Windows 7 is the second option

share|improve this answer
    
ok, I thought its menu.lst. Nevertheless, +1 for the link @MichaelMrozek :-) –  Nikhil Mulley Jan 9 '12 at 9:48
    
@Nikhil Usually menu.lst is a symlink for grub.conf (so either would work) –  Michael Mrozek Jan 9 '12 at 14:40

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.