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

General support questions including new installations
Post Reply
ospeff
Posts: 5
Joined: 2009/12/26 15:25:17

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

Post by 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?

kylewhat
Posts: 1
Joined: 2010/01/09 02:44:08

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

Post by 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

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

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

Post by 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
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

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

Post by 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
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

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

Post by AlanBartlett » 2010/01/09 16:12:48

I'm sure there is a [i]CentOS[/i] wiki page about re-installing [i]grub[/i] . . . [url=http://wiki.centos.org/TipsAndTricks/ReinstallGRUB]here[/url] it is.

As I never have anything to do with [i]Windoze[/i], my next comment may be a little askew -- I believe you will need to have a stanza in your [b]/etc/grub.conf[/b] file that [i]chainloads[/i] the [i]Windoze[/i] OS.

User avatar
toracat
Site Admin
Posts: 7518
Joined: 2006/09/03 16:37:24
Location: California, US
Contact:

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

Post by toracat » 2010/01/09 16:37:34

[quote]
AlanBartlett wrote:
I'm sure there is a [i]CentOS[/i] wiki page about re-installing [i]grub[/i] . . . [url=http://wiki.centos.org/TipsAndTricks/ReinstallGRUB]here[/url] it is.
[/quote]
Oh, how did I miss that one? Embarrassing to see the last author of that page. :oops:

azca
Posts: 174
Joined: 2006/06/03 18:06:13
Location: Peoria, AZ USA

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

Post by azca » 2010/01/09 16:55:05

The grub.conf stanza on one of my multiboot Win-XP / CentOS computers is simply:
[code]
title Microsoft XP Home Edition
rootnoverify (hd0,0)
chainloader +1
[/code]
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:

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

Again, I haven't tried this, but it may be worth a try.

User avatar
AlanBartlett
Forum Moderator
Posts: 9345
Joined: 2007/10/22 11:30:09
Location: ~/Earth/UK/England/Suffolk
Contact:

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

Post by AlanBartlett » 2010/01/09 17:05:15

Another example of teamwork!

(For fear of being moderated, I won't mention the fact that the [i]CentOS[/i] wiki's [b]AkemiYagi[/b] == the [i]CentOS[/i] fora's [b]toracat[/b] :lol: )

Post Reply