[SOLVED] Exchange older distros GRUB with CentOS5.4's one

General support questions including new installations
Post Reply
chuina
Posts: 355
Joined: 2009/12/11 10:25:56

[SOLVED] Exchange older distros GRUB with CentOS5.4's one

Post by chuina » 2010/02/06 18:33:44

I'm using Ubuntu 9.10's GRUB.

Now i wish to exchange it with CentOS-5.4's GRUB :-D

I didn't install GRUB during CentOS installation. Searched through Google and CentOS wiki find
all about rescuing GRUB.

Any Idea.

Thanx.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] Exchange older distros GRUB with CentOS5.4's one

Post by pschaff » 2010/02/06 20:07:39

If you type "GRUB" into the Wiki search and cllick "Titles" you will find

http://wiki.centos.org/TipsAndTricks/ReinstallGRUB

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: Exchange older distros GRUB with CentOS5.4's one

Post by chuina » 2010/02/07 00:13:08

I read [url=http://wiki.centos.org/TipsAndTricks/ReinstallGRUB]that[/url] TipsAndTricks before posting this thread.

[ Also read [url=http://wiki.centos.org/PhilSchaffner?highlight=(phil)]your_profile[/url] and astonished by knowing that you are involve with NASA. :-D ]

The "chroot" method under the "chroot shell" didn't work.
The result of "grub-install /dev/hda"

[code]#/dev/hda does not have any corresponding BIOS drive[/code]
Also, upgrade an existing CentOS with CD1 don't work.
I think it only works with broken MBR. Without any installed GRUB it doesn't work.

I already mess-up "centos-ds" with existing "httpd". So a fresh installation was a matter of time.

After fresh install, I have two grub configuration file.
No1. of Ubuntu 9.10 /boot/grub.cfg
No2. of CentOS 5.4 /boot/grub.conf

Still using older grub !
Clearing the MBR and retry with chroot-method may work.But how can I clear MBR ? Not sure

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

Re: Exchange older distros GRUB with CentOS5.4's one

Post by pschaff » 2010/02/07 16:06:09

Sounds like a BIOS issue, or an error in specifying the boot device. What is the disk configuration? Showing[code]
/sbin/fdisk -l
/sbin/lspci
[/code]
from either CentOS or Ubuntu might help.

If you still have Ubuntu installed there is no real need to replace its GRUB. Ubuntu has a later version than CentOS and you may have issues booting Ubuntu with CentOS GRUB. A forum search on "grub ubuntu" will turn up some background. Just add a stanza to the Ubuntu /boot/grub/menu.list to chainload to CentOS:[code]
title chainload CentOS GRUB
root (hd0,3)
chainloader +1
[/code]

Replace (hd0,3) with the location of the CentOS boot partition, assuming you wrote GRUB there.

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: Exchange older distros GRUB with CentOS5.4's one

Post by chuina » 2010/02/07 19:02:47

Solved.

***It will be great if there is a tool for marking a thread as solved by its poster.

[I'm not going to tell why i wished to use CentOS's GRUB cause it will criticize the non-CentOS distro and breaks forum rule.]

Thanks.

pschaff
Retired Moderator
Posts: 18276
Joined: 2006/12/13 20:15:34
Location: Tidewater, Virginia, North America
Contact:

[SOLVED] Re: Exchange older distros GRUB with CentOS5.4's one

Post by pschaff » 2010/02/07 21:40:59

Glad you got it working. The only current tool is called "Moderator Edit" which has been done.

As far as criticism - valid pointing out of true deficiencies will not get one in trouble. Unsubstantiated or misinformed trashing of the distro will. :-)

I expect your (valid) reason could have something to do with the number of bytes in an inode.

chuina
Posts: 355
Joined: 2009/12/11 10:25:56

Re: [SOLVED] Re: Exchange older distros GRUB with CentOS5.4's one

Post by chuina » 2010/04/10 19:43:47

An update is needed for a part of this thread. Future forum searchers may get some benefit of it...

[quote]grub-install /dev/hda
#/dev/hda does not have any corresponding BIOS drive[/quote]

The solution for this message/failure is:
[code]grub-install --recheck /dev/hda[/code]
Sometime it may be /dev/sda

Post Reply