LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora > Fedora - Installation
User Name
Password
Fedora - Installation This forum is for the discussion of installation issues with Fedora.

Notices

Reply
 
Search this Thread
Old 01-15-2007, 10:33 AM   #1
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Rep: Reputation: 15
installing grub over lilo (for fc6)


I am trying to install Fedora Core 6 over my existing Slackware installation. I dual boot with XP on my primary 60GB hard drive and Slackware on my secondary 40GB hard drive. LILO is my boot loader, but (my guess is) FC6 will want to install Grub. I am okay with installing Grub over LILO but I want to be sure that I am not going to wipe out XP whatsoever.

Has anybody done this or know if it is possible? And if you have done it how do you do it or are there any caveats I should know about?

BTW I did a search and uncovered this thread, which got close but did not answer my question:
Changing Linux Distro There were other threads about Grub/LILO that suggest what I want to do is possible but I wanted to know if anyone has successfully done this before.
 
Old 01-16-2007, 03:01 AM   #2
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
You won't wipe out XP. Anaconda (the fedora installer) is actually pretty good at this. There is a partitioning step in the install process and you get the option to tell it to dual boot. If LILO is installed to MBR already, then select to install GRUB to MBR. (Note - last I did this, anaconda would let you install lilo if you wanted. GRUB is nicer though.)

All this overwrites LILO in MBR and grub will handle the dual boot fine.

(BTW: I have successfully changed distro on a dual boot box - Win98+RH9 -> win98+FC2 -> win98+Hoary ... the process was totally painless.)

Last edited by Simon Bridge; 01-16-2007 at 03:03 AM.
 
Old 01-16-2007, 10:22 AM   #3
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Original Poster
Rep: Reputation: 15
Excellent I will try this tonight.
 
Old 01-22-2007, 02:34 PM   #4
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Original Poster
Rep: Reputation: 15
I was surprised this did not work! When I boot LILO still comes up but with the old menu and everything. It can boot XP fine but obviously there is no entry for FC6.

I installed grub to a floppy and I am able to boot my fedora installation using that. I tried to install grub with grub-install /dev/hda however that too failed. I dont have access to the error message now but I will post it later when I have it. Anyway that is an update on what is going on.
 
Old 01-25-2007, 05:02 AM   #5
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Well, if installing grub got an error - of course lilo still starts up.
And, of course, if LILO is not installed to MBR...

Let me know the error.
 
Old 01-28-2007, 01:23 AM   #6
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Original Poster
Rep: Reputation: 15
So here's what's going on.

root@localhost# grub-install /dev/hda
/dev/hdb1 does not have any corresponding BIOS drive.

I find it strange that I typed /dev/hda and its giving an error about /dev/hdb1. Anyway since everything is backed up I'm going to attempt to "install GRUB natively" instead of using the grub-install method.

Update:

Installing natively failed.

grub> root (hd0,0)
Filesystem type unknown, Partition type 0x7

grub> find /boot/grub/stage1
File not found.

grub> find (hd1,0)/boot/grub/stage1
File not found.

This is frustrating...

Last edited by mjl3434; 01-28-2007 at 01:35 AM.
 
Old 01-28-2007, 03:03 AM   #7
Simon Bridge
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Quote:
I find it strange that I typed /dev/hda and its giving an error about /dev/hdb1. Anyway since everything is backed up I'm going to attempt to "install GRUB natively" instead of using the grub-install method.
Suggests the device map is out - grub-install doesn't handle dev-fs type symlinks as well as it should.

I take it this was invoked from the existing slackware?
Can you see a file like /boot/grub/device.map ?

I suppose you could try grub-install (hd0) but I think you want to make sure of that device map first.

Looking at the rest...
Quote:
grub> root (hd0,0)
Filesystem type unknown, Partition type 0x7
... type 0x7 is ntfs, which is correct for (hd0,0) (i.e. hda1 = WinXP).

That "root" command should be "rootnoverify".

Why don't you let anaconda install grub for you?
 
Old 01-28-2007, 11:33 AM   #8
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Original Poster
Rep: Reputation: 15
Quote:
Why don't you let anaconda install grub for you?
That's what I tried initially. "I was surprised this did not work!" is a vague sentence but I meant that I tried using FC6's installer Anaconda and it does not seem to install grub on the MBR of hd0. My guess is that is installing to the MBR of hd1. If that was the case my understanding is that I'd need to somehow chainload the current LILO to boot grub. However that is not what I want. I just want GRUB installed on the MBR of hd0.

Quote:
That "root" command should be "rootnoverify".
You are right. I can boot XP with my grub boot disk as follows:

rootnoverify (hd0,0)
chainloader +1
makeactive
boot

Likewise I boot linux with my grub boot disk as follows:

kernel (hd1,0)/vmlinuz-[tab-completion-from-here]
initrd (hd1,0)/initrd-[tab-completion-from-here]
boot

Quote:
Can you see a file like /boot/grub/device.map ?
[root@localhost]# cat device.map
# this device map was generated by anaconda
(hd0) /dev/hda

Last edited by mjl3434; 01-28-2007 at 12:15 PM.
 
Old 01-28-2007, 06:25 PM   #9
mjl3434
Member
 
Registered: Sep 2003
Location: Los Angeles, CA
Distribution: Fedora 8
Posts: 100

Original Poster
Rep: Reputation: 15
Problem solved.

I found the ultimate resource on dual booting and it cleared up some of my questions.

For those who are curious. I learned that only the stage1 section of grub is installed on the MBR. The stage1_5 & stage2 stuff in installed on grubs root device. In my case I wanted this to be my second hard drive so it would not overwrite XP's boot loader, which is installed on the second sector (referred to in grub as "chainloader +1"). Here is what I did once I got into linux from a boot disk:


root@localhost# grub
grub> root (hd1,0)
<-- This tells grub to put stage 1.5 & 2 on the second hard drive.

grub> setup (hd0) <-- This installs grub's stage 1 on the MBR of the first hard drive.

Also note. I had my /boot/grub/grub.conf file already configured. I tested my configuration by using a grub boot disk to boot first before committing any changes to the hard drive. I would highly recommend this as it may help you to boot your system if you screw something up.
 
  


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 not finding grub.conf post fc6 upgrade billymayday Fedora - Installation 1 10-30-2006 04:26 AM
My Lilo/grub lost after installing Win Xp leenuk Linux - Newbie 15 02-05-2006 08:41 PM
Installing Grub over LILO arpanetguru Linux - Software 3 01-02-2006 06:19 PM
Switching from grub to lilo, messed up Lilo.conf, rescuing via Knoppix. SonicGT Debian 2 08-21-2005 01:15 PM
GRUB/LILO not installing... uranologist Red Hat 7 12-17-2003 08:16 AM


All times are GMT -5. The time now is 09:44 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 Google+: linuxquestions
Open Source Consulting | Domain Registration