Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I had installed reinstalled windows and ubuntu various times.

Now Everything is set and I want to edit grub to set windows 7 as my default os

when I run this command

gksudo gedit /boot/grub/menu.lst

I get an error that No such file or Directory found`

then I tried this

sudo grub
find /boot/grub/stage1

I get an error No File found. Can anybody help me how can I change my default os?

// Edited

ls -a /boot/grub

ls -a /boot/grub

share|improve this question
    
what does "ls -a /boot/grub" say? –  Iain Jan 13 '10 at 11:00
    
Please check the editted part –  Shishant Jan 13 '10 at 11:08
add comment

3 Answers 3

You've installed GRUB2, there where several changes to it. For global options please see the /boot/grub/grub.env and edit this one, for changing the boot order, reorder the scripts in /etc/grub.d/ (reorder them by replacing the leading numbers in the filename).

share|improve this answer
    
can you guide me what should I do I am unable to understand –  Shishant Jan 13 '10 at 11:22
    
You need to be absolutely sure what you're doing when you change an important file like this. –  pavium Jan 13 '10 at 11:32
add comment

I believe the file containing the menu is now grub.cfg

When I changed it, I just edited it (and ignored the message NOT to do so).

I can see it in the listing you provided. I think you want to put the entry for Windows 7 first in the menu.

I hesitate to say more, because I don't have a Windows entry in my grub.cfg, and it would be dangerous for me to speculate on what to do next.

share|improve this answer
add comment
up vote 2 down vote accepted
sudo gedit /etc/default/grub

then edit the line -
GRUB_DEFAULT=0
to
GRUB_DEFAULT=4 (assuming you have only 2 os 1 ubuntu another xp / vista / 7)

save the file, then run

sudo update-grub
share|improve this answer
add comment

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.