0

I have Centos and Win 7 installed in same PC. How Can I change setting in CentOS to show Windows 7 in top of the list in boot menu ?

0

2 Answers 2

3

Edit your /boot/grub/grub.conf (or /boot/grub/menu.lst) so that the entry that looks like

title Windows 7
    ....
    ....

is the topmost of the entries (they all start with title)

You need to either log in as root (su) or use sudo, e.g. sudo <your favourite editor> /etc/boot/menu.lst

6
  • And how exactly? Aug 9, 2012 at 18:48
  • @Kimvais /boot/grub/grub.conf, when I trying to edit, it is showing, permission denied. so how exctly edit this, plz help .. Aug 9, 2012 at 18:51
  • @IndianGirl I would try to edit the file like this on ubuntu/debian: sudo vi /boot/grub/grub.conf. Maybe your problem with editing is more complex than that, i don't know. Aug 9, 2012 at 19:07
  • @Ben7005 now it is working (sudo vi /boot/grub/grub.conf). But I am very new to linux. so plz give me hint that how can I edit this ? means I have to set default=0 to default=1 . plz tell me Aug 9, 2012 at 19:23
  • 1
    Even better, change the default 0 line.
    – Ben Voigt
    Aug 9, 2012 at 20:05
1

Thanks to Kimvais for the location of the file, that was most of the answer!

To start, type in sudo vi /boot/grub/grub.conf.

This command works like this:

  • sudo tells Centos that you want to perform the rest of the command with root privileges (so that you can save the file).
  • vi /boot/grub/grub.conf tells Centos to use the vi program to edit /boot/grub/grub.conf.

Now that you are in vi, navigate (using arrow keys or h=left j=up k=down l=right) to the place that you want to edit and change the values that you want.

Now press Ctrl+C, then :wq, then hit Enter.

This works like so:

  • Ctrl+C sets vi to command mode
  • : begins the command
  • w means save
  • q means quit
  • Enter runs the command, saving your file and then exiting vi.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .