LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Changing Boot Loader from Lilo to Grub (https://www.linuxquestions.org/questions/linux-general-1/changing-boot-loader-from-lilo-to-grub-237065/)

annointed3 09-30-2004 08:32 AM

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

homey 09-30-2004 09:05 AM

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


annointed3 09-30-2004 10:41 AM

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

homey 09-30-2004 01:25 PM

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

annointed3 09-30-2004 02:15 PM

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?

homey 09-30-2004 03:26 PM

It could be the upgrade route just isn't going to work.

Neutron1998 09-30-2004 11:25 PM

What are the advantages of using grub over lilo?

Glas 09-30-2004 11:33 PM

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 :(


All times are GMT -5. The time now is 11:08 PM.