LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-19-2010, 08:43 AM   #1
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 315

Rep: Reputation: 34
how to reinstall grub after windows instln


hi all,
I had a dual boot system - windows in primary active /dev/sda1 and fedora in /dev/sda5 onwards till /dev/sda7 ( /boot, / and swap partitions).
I reinstalled windows vista and it removed grub and replaced it with the MBR or windows loader.So now I can't boot into the linux OS.
I tried out a live cd and tried
grub-install --root-directory=/mnt/_boot /dev/sda
(after mounting /boot partition at /mnt/_boot location from the live cd.)
But on reboot I donot get the menu.lst options, only the black screen with a grub prompt.
Can someone help me how to reinstate the grub loader from the /boot partition i.e /dev/sda5.
thanks in advance
nishtih
 
Old 11-19-2010, 08:56 AM   #2
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
In the black grub prompt,

Quote:
grub> find /boot/grub/stage1

(hd0,4)
Go on typing:

Quote:
grub> root (hd0,4)
You will get a system response like “(hd0,4)” or "(hd0,5)” something like this

Quote:
grub> setup (hd0,4)
The final command let you exit the grub shell:

grub> quit

Now reboot the system and remove the bootable live media.
 
Old 11-19-2010, 08:57 AM   #3
divyashree
Senior Member
 
Registered: Apr 2007
Location: bbsr,orissa,India
Distribution: RHEL5 ,RHEL4,CENT OS5,FEDORA,UBUNTU
Posts: 1,363

Rep: Reputation: 135Reputation: 135
Or you can run into rescue mode from the fedora cd,

then in the command mode

Quote:
chroot /mnt/sysimage
grub-install /dev/sda
 
1 members found this post helpful.
Old 11-19-2010, 01:40 PM   #4
nkd
Member
 
Registered: Oct 2006
Location: india
Distribution: fedora 8, ubuntu 10.10
Posts: 315

Original Poster
Rep: Reputation: 34
thanks
the fedora cd stuff worked like a charm
bye
nishith
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Grub problem after windows reinstall edencraze Linux - Newbie 6 03-23-2008 11:06 AM
how to fix GRUB after reinstall windows xp dual boot ctdarksilver Ubuntu 2 05-06-2007 11:35 PM
How to reinstall GRUB after WIndows installation Oracbase Linux - Software 9 11-18-2005 09:43 PM
reinstall windows, reinstall GRUB too? leupi Linux - Software 1 05-07-2005 11:50 AM
What will happen to GRUB if i reinstall windows? ksoma Linux - Software 7 02-04-2004 03:53 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration