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

link|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
feedback

3 Answers

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
link|improve this answer
feedback

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).

link|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
feedback

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.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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