LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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
  Search this Thread
Old 09-30-2004, 08:32 AM   #1
annointed3
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Rep: Reputation: 0
Changing Boot Loader from Lilo to Grub


Hi,

I would like to change my boot loader from lilo to grub. I have an already installed, fully functional, dual boot FC1 / W2K machine. From the research that I've done so far, I believe I would have to use fdisk /mbr command to remove lilo from mbr. I would then create a grub.conf file with the proper information, but I think there is something else I need to do. Isn't there some type of initd. file I have to modify? Well, If anyone can help, I would really appreciate it?

Thanks
 
Old 09-30-2004, 09:05 AM   #2
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Hi,
You don't need to do the fdisk/mbr as installing the grub will over write it.

First, install the grub rpm. Using yum install grub or apt-get install grub is easy but you can go find an rpm or .gz and do things manually.

Then, while in the Linux system, run the command: grub-install /dev/hda
Note: that puts stage1, stage2 and a bunch of stuff in the /boot/grub directory.

If that didn't make a /boot/grub/grub.conf then you could create one and paste this info into it.
Note: change the kernel and initrd to match what you have.

Code:
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd1,1)
#          kernel /boot/vmlinuz-version ro root=/dev/hdb2
#          initrd /boot/initrd-version.img
#boot=/dev/hda
default=1
timeout=15
splashimage=(hd1,1)/boot/grub/splash.xpm.gz
title Windows
	rootnoverify (hd0,0)
	chainloader +1
title Fedora Core 1
	root (hd1,1)
	kernel /boot/vmlinuz-2.4.22-1.2199.nptl ro root=LABEL=/ hdc=ide-scsi rhgb
	initrd /boot/initrd-2.4.22-1.2199.nptl.img

Last edited by homey; 09-30-2004 at 10:19 AM.
 
Old 09-30-2004, 10:41 AM   #3
annointed3
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Hi,

Thanks for the input, but I have a problem.

I recently upgraded my dual boot (RH 7.1/ W2k) to (FC1 / W2k), when I did the upgrade it was suppose to update the boot loader.

Well, anyway now, when I boot up, it's still using the old kernel (2.4.5). When I try to run rpm commands, I get the following:

rpm: error while loading sharded libraries: libbeecrypt.so.6: cannot enable executable stack as shared object requires: Error 14

Well, I'm assuming that this error may be associated with FC! and old kernel. Here is an ouput from my current lilo.conf file

boot=/dev/hda2
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
default=W_scanner

image=/boot/vmlinuz-2.4.22-1.2115.nptl
label=2.4.22-1.2115.n
read-only
initrd=/boot/initrd-2.4.22-1.2115.nptl.img
append="root=LABEL=/"

image=/boot/vmlinuz-2.4.5
label=Linux-2.4.5
read-only
root=/dev/hda5

image=/boot/vmlinuz-2.4.18
label=W_scanner

So, I can't install any rpms because the rpm command doesn't work and linux is booting up using the old kernel not the new one (2.4.22...., I don't even get an option for that kernel)

Any ideas?????
 
Old 09-30-2004, 01:25 PM   #4
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
Upgrading from 7.1 to FC1 is quite a leap and I'm not even sure if it will work.
You could try edit the lilo.conf so your Fedora label is short and alpha-numeric. Then run the command: /sbin/lilo -L

boot=/dev/hda2
map=/boot/map
install=/boot/boot.b
prompt
timeout=50
message=/boot/message
default=Fedora

image=/boot/vmlinuz-2.4.22-1.2115.nptl
label=Fedora
read-only
initrd=/boot/initrd-2.4.22-1.2115.nptl.img
append="root=LABEL=/"

image=/boot/vmlinuz-2.4.5
label=Linux-2.4.5
read-only
root=/dev/hda5

image=/boot/vmlinuz-2.4.18
label=W_scanner
 
Old 09-30-2004, 02:15 PM   #5
annointed3
LQ Newbie
 
Registered: Aug 2004
Posts: 8

Original Poster
Rep: Reputation: 0
Hi Homey,

I followed your directions and I did not get any errors when I ran the lilo command, but I think I'm missing something.

This machine was a machine that was built by someone else and was given to me to maintain and upgrade, so forgive me if I miss some things.

When I initially boot up the machine., i get a dos like menu with the choices:

Linux Redhat 7.1
Windows 2000 Professional
Win2k Pro within VMware only.

I assume this is from the boot.ini file in Windows. Should I have to make any changes to this file?

Well anyway I select Linux RedHat 7.1, Another windows pops up, more graphical, has a picture of a man with a hat,I'm assuming this is lilo, and gives me the following options:

Linux 2.4.5
Backup
Wscanner

Why am I not getting an option for Fedora? It's in the lilo.conf file, I don't understand?
 
Old 09-30-2004, 03:26 PM   #6
homey
Senior Member
 
Registered: Oct 2003
Posts: 3,057

Rep: Reputation: 61
It could be the upgrade route just isn't going to work.
 
Old 09-30-2004, 11:25 PM   #7
Neutron1998
Member
 
Registered: Sep 2004
Distribution: Fedora Core 3
Posts: 69

Rep: Reputation: 15
What are the advantages of using grub over lilo?
 
Old 09-30-2004, 11:33 PM   #8
Glas
Member
 
Registered: Aug 2004
Location: Atlanta, GA
Distribution: Slackware, PC-BSD v0.6, FreeBSD v5.3
Posts: 82

Rep: Reputation: 15
The only difference I have noticed is being able to put a password on Grub so you can't pass exceptions to the kernel. Other than that I can't remember anything else. Work makes me stupid
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Change loader from grub to lilo _tracyy Linux - Software 2 07-22-2004 09:23 PM
Can't change boot loader from GRUB to LILO ikeTightPants Linux - Software 3 05-21-2004 09:30 AM
Switch Boot Loader from Grub to Lilo l2g Linux - Newbie 1 02-15-2004 09:34 AM
trouble install boot loader grub or lilo tilley Linux - Software 10 10-24-2003 04:13 PM
Lilo to Grub Boot loader Maurice Arthur Linux - Software 3 07-23-2001 09:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration