Messed up MBR, can't get centos to boot.

General support questions including new installations

Messed up MBR, can't get centos to boot.

Postby ospeff » 2010/01/09 02:39:41

So I originally had Windows 7 on my main hard drive, I installed cent os on the 2nd partition of a 2nd hard drive, GRUB didn't have an entry for Windows when I booted up (usually when I install a linux OS, grub automatically installs and keep and windows entry) so I loaded the Windows 7 install disc and restored the default windows MBR.

Now Windows 7 loads but I have no idea how to make CentOs load again, I just want to have grub or a boot manager like that to let me choose what OS to boot when PC is started, how can I get centos to boot again?
ospeff
 
Posts: 5
Joined: 2009/12/26 15:25:17

Re: Messed up MBR, can't get centos to boot.

Postby kylewhat » 2010/01/09 02:48:23

I think you need to adjust your attitude if you expect help from anyone on these boards. Consider this a warning.

-SMB if you competin w/me
kylewhat
 
Posts: 1
Joined: 2010/01/09 02:44:08

Re: Messed up MBR, can't get centos to boot.

Postby toracat » 2010/01/09 15:57:47

Just a quick note to say I do not see any problem with the original post.
User avatar
toracat
Forum Moderator
 
Posts: 6974
Joined: 2006/09/03 16:37:24
Location: California, US

Re: Messed up MBR, can't get centos to boot.

Postby toracat » 2010/01/09 16:07:05

Now my response to the OP. :-)

When you initially installed CentOS, it should have identified the installed WIndows and added an entry in the grub.conf file. Didn't you see during the install the option about which OS to make the default?

Anyway, now that you have redone the MBR from Windows, you would want to set it up from CentOS. Boot the machine with the install media into the rescue mode. Mount the existing CentOS by following the on-screen instructions. Then you can try the command (for example):

grub-install /dev/sda

You need to adjust the /dev/sda part depending on your hardware.
User avatar
toracat
Forum Moderator
 
Posts: 6974
Joined: 2006/09/03 16:37:24
Location: California, US

Re: Messed up MBR, can't get centos to boot.

Postby AlanBartlett » 2010/01/09 16:12:48

I'm sure there is a CentOS wiki page about re-installing grub . . . here it is.

As I never have anything to do with Windoze, my next comment may be a little askew -- I believe you will need to have a stanza in your /etc/grub.conf file that chainloads the Windoze OS.
User avatar
AlanBartlett
Forum Moderator
 
Posts: 9156
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk

Re: Messed up MBR, can't get centos to boot.

Postby toracat » 2010/01/09 16:37:34

AlanBartlett wrote:
I'm sure there is a CentOS wiki page about re-installing grub . . . here it is.

Oh, how did I miss that one? Embarrassing to see the last author of that page. :oops:
User avatar
toracat
Forum Moderator
 
Posts: 6974
Joined: 2006/09/03 16:37:24
Location: California, US

Messed up MBR, can't get centos to boot.

Postby azca » 2010/01/09 16:55:05

The grub.conf stanza on one of my multiboot Win-XP / CentOS computers is simply:
Code: Select all
title Microsoft XP Home Edition
        rootnoverify (hd0,0)
        chainloader +1

But Windows 7 may be a horse of another color. Sorry, but I have no experience with Win 7 or Vista. :\

Ospeff, if you still run in to problems following Toracat and Alan's suggestions, you may want to try Saikee's at this link:

http://www.justlinux.com/forum/showthread.php?t=144294

About half way down the page at post #3:

E5: To use Windows Vista or Windows 7 (bith 32 or 64 bit) to boot a chainlaodable Linux in partition hda8.

Again, I haven't tried this, but it may be worth a try.
azca
 
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

Re: Messed up MBR, can't get centos to boot.

Postby AlanBartlett » 2010/01/09 17:05:15

Another example of teamwork!

(For fear of being moderated, I won't mention the fact that the CentOS wiki's AkemiYagi == the CentOS fora's toracat :lol: )
User avatar
AlanBartlett
Forum Moderator
 
Posts: 9156
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk


Return to CentOS 5 - General Support

Who is online

Users browsing this forum: No registered users and 0 guests