[boot direct Windows]

Asked by Athani

I was on Ubuntu 10.04 and Windows 7, with Ubuntu being the default in GRUB.

For some reason, I had to reinstall Windows. Now on start up, GRUB does not show at all and the computer directly boots into Windows.

How can I fix this problem?

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu grub2 Edit question
Assignee:
No assignee Edit question
Solved by:
Richard Garvin
Solved:
Last query:
Last reply:
Revision history for this message
David Mawdsley (dm-madmod) said :
#1

If Windows is reinstalled, the boot choices are tossed out and Windows is the default. You probably have to reload Ubuntu on a second partition--after the reinstall of Windows. Make sure then that you save all the GRUB details in case a Windows update or service pack overwrites it. I think you'll then have to use an Ubuntu Live CD to replace the GRUB environment if this happens. Of course backup your personal data.

Revision history for this message
Athani (chandan-athani) said :
#2

I'm still not clear about what is to be done.

Will I have to reinstall Ubuntu? Or is there something that I can do after booting via the Ubuntu Live CD to restore GRUB?

And how do I go about each of these?

Revision history for this message
Richard Garvin (garvinrick4) said :
#3

Put in live CD.
use code:
sudo fdisk -l (small L)
Find Ubuntu sdax number (we will use sda5 for this post.)
Open disk utility and click on hard drive on left and the click on sda5 and
choose to edit Label if you do not have one. Make a label (lets say you choose to type in lucid for this post)

Open a terminal and code:
sudo mkdir /media/lucid
sudo mount /dev/sda5 /media/lucid
 sudo grub-install --recheck --root-directory=/media/lucid /dev/sda
sudo umount /media/lucid

Restart and choose Ubuntu when boots up code:
sudo update-grub

Revision history for this message
Best Richard Garvin (garvinrick4) said :
#4

You made a directory (folder) for your install (/media/lucid)
you mounted the install
you installed grub2 to install in sda (the mbr of drive)
you unmounted install
restart
updated grub to get all installs in grub.

Revision history for this message
Athani (chandan-athani) said :
#5

Thanks Richard Garvin, that solved my question.

Revision history for this message
Athani (chandan-athani) said :
#6

Thanks a lot Gavin :-)

Revision history for this message
ankit (ankit-jivrani) said :
#7

i have dell inspiron 15 laptop with windows 7 and then i install ubuntu 9.10 and now i get error:

Grub loading.
The symbol ' ' not found.
Aborted. Press any key...

i know this is the problem of grub loader and i tried the solution which u provide here but still i face same problem.

give me reply as soon as possible...

Revision history for this message
David Mawdsley (dm-madmod) said :
#8

Ankit, here's a link to how to deal with GRUB issues:
http://ubuntuforums.org/showthread.php?t=1195275
Perhaps there's something there that can sort things out for you.