LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 07-03-2005, 08:48 AM   #1
SupaDucta
LQ Newbie
 
Registered: Oct 2004
Location: Zagreb, Croatia
Distribution: CentOS 4.4
Posts: 24

Rep: Reputation: 15
CentOS 4.1: LILO replaced GRUB and... how to restore?


When installing CentOS 4, I chose GRUB as the boot loader. Installed KDE 3.3 and went configuring further.

Then I upgraded to KDE 3.4.1 using CentOS RHEL rpms, and since KDE 3.4.1 uses LILO natively, it switched the boot loader to LILO.

Then, at 5 AM, tired as hell, I made a rather stupid thing - grub install and rebooted the machine.

Got to grub> shell and since it was already a morning and I needed my Windows XP to be bootable for the morning, I did a fixmbr to at least be able to use Windows the next day (the machine being a dual boot).

Now, booting the system from CentOS 4 CD and choosing linux rescue finds a CentOS install normally, and mounts it as /mnt/sysimage. From there I can navigate to old system ie. I can get to old GRUB files and grub.conf. And typing grub from there gets me a grub> shell.

Now I need to restore GRUB multi-boot as was before, but searching the internet really gives me a zillion different howtos, and I need to be very careful doing this.

My partition structure is the following:

/hda1 ---> NTFS with WinXP, originally boot loader was here
/hda2 ---> NTFS, WInXP temp partition, not to be touched
/hdb1 ---> NTFS, Works files, not to be touched
/hdb2 ---> NTFS, Archives, not to be touched
/hdb3 ---> NTFS, not to be touched
/hdb4,5,6 ---> Linux partitions

How do I proceed to restore GRUB?

My menu.lst is as follows:

Code:
#boot=/dev/hda
default=2
timeout=10
splashimage=(hd1,4)/grub/splash.xpm.gz
hiddenmenu

title CentOS 4.1 (2.6.9.-11.EL)
   root(hd1,4)
   kernel /vmlinuz-2.6.9-11.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   initrd /initrd-2.6.9.-11.EL.img

title CentOS 4.0 (2.6.9.-5.0.3.EL)
   root(hd1,4)
   kernel /vmlinuz-2.6.9.-5.0.3.EL ro root=/dev/VolGroup00/LogVol00 rhgb quiet
   initrd /initrd-2.6.9.-5.0.3.EL.img

title Windows XP
   rootnoverify(hd0,0)
   chainloader+1

Last edited by SupaDucta; 07-03-2005 at 09:12 AM.
 
Old 07-04-2005, 02:45 AM   #2
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 30
Use the Centos rescue enviroment and chroot /mnt/sysimage
Then grub-install /dev/hda
See if there are any errors.
All being well grub will now be the boot loader.
 
Old 07-04-2005, 11:35 AM   #3
SupaDucta
LQ Newbie
 
Registered: Oct 2004
Location: Zagreb, Croatia
Distribution: CentOS 4.4
Posts: 24

Original Poster
Rep: Reputation: 15
Worked like a charm.

Thanks a lot, you definitely saved my day
 
Old 07-04-2005, 12:30 PM   #4
james.farrow
Member
 
Registered: Mar 2003
Location: UK Darlington
Distribution: Fedora Freebsd Centos
Posts: 288

Rep: Reputation: 30
Centos has some good forums too. Have alook at the redhat site, you can download the manuals in pdf.
Centos is just about RHEL4, there is a number to download, not sure how many.
They cover all aspects of RHEl.
Glad it you´re back up and running.
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Booting of raw ISO from GRUB/LILO (though preferably GRUB) Orkie Linux - Software 22 08-08-2011 08:43 AM
Software RAID 1 setup on CentOS using Grub boot loader kumarsundaram Linux - Software 1 11-30-2005 12:57 PM
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
FC3's Grub Replaced by Mandrake10.0 dhn_123 Linux - Newbie 5 03-16-2005 11:23 PM
update centos 4 rc1 to centos 4 trou yum? maxut cAos 2 03-04-2005 02:36 AM


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

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration