Replacing LILO with Grub...how?

BlueWeasel

Lifer
Jun 2, 2000
15,944
475
126
In my neverending search of distros, I've just intalled PCLinuxOS and like it. However, it uses LILO instead of Grub, and I'd like to remove LILO and install Grub in it's place.

So far, I've done the following:

apt-get -y remove --purge lilo
apt-get clean
apt-get update
apt-get install grub
grub-install /dev/hda
update-grub

Everything works great until I get a command not found when I try to run "update-grub" (must be a Debian thing). So how to I generate the menu.lst file in /boot/grub?
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Not sure.

Do you have a /boot/grub/grub.conf? Those are intechangable with menu.lst. (most of the time they are symlink'd to one another)

As long as grub is installed in the mbr it will read the configuration file. automagicly.

If you don't have a configuration file by default I suppose you could just make one.

It goes like this, a complex version from here
# 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 (hd0,8)
# kernel /boot/vmlinuz-version ro root=/dev/hda9
# initrd /boot/initrd-version.img
#boot=/dev/hda
# By default boot the second entry
default=1
# Fallback to the first entry.
fallback 0
# Boot automatically after 2 minutes
timeout=120
splashimage=(hd0,8)/boot/grub/splash.xpm.gz
title Windows 2000
unhide (hd0,0)
hide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,0)
chainloader +1
makeactive
title Red Hat Linux (2.4.18-19.8.0.19mar2003)
root (hd0,8)
kernel /boot/bzImage.2.4.18-19.8.0.19mar2003 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0custom.img.19mar03
title Red Hat Linux (2.4.18-19.8.0custom)
root (hd0,8)
kernel /boot/vmlinuz-2.4.18-19.8.0custom ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0custom.img
title Red Hat Linux (2.4.18-14)
root (hd0,8)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-14.img
title MyKernel.26jan03 (Red Hat Linux 2.4.18-14)
root (hd0,8)
kernel /boot/bzImage.myker.26jan03 ro root=LABEL=/ hdd=ide-scsi
initrd /boot/initrd-2.4.18-19.8.0.img
title Windows 98
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
rootnoverify (hd0,2)
chainloader +1
makeactive
title DOS 6.22
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
rootnoverify (hd0,1)
chainloader +1
makeactive
title Partition 2 (floppy)
hide (hd0,0)
unhide (hd0,1)
hide (hd0,2)
chainloader (fd0)+1
title Partition 3 (floppy)
hide (hd0,0)
hide (hd0,1)
unhide (hd0,2)
chainloader (fd0)+1

That's all if you doing things like tricking Windows into thinking the partitions and harddrives are setup differently then they realy are. You do that to work around Window's limitations...

For a simplier one you go:

default=0
timeout=120
title Your.Linux
root (hd0,0)
kernel /boot/vmlinuz
initrd /boot/initrd

I think that's all you realy need.

Of course keep a boot disk handy so you can go in and fix it if I'm wrong or you have a typo. Knoppix is usually handy.